Jump to content
  • Advertisement
Sign in to follow this  
tHomahwk

[java] Adding files to the project in NetBeans

This topic is 4093 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This probably belongs in the "For Beginners" forum, but this is more of a Java issue so I thought it belonged here. If its wrong...sorry!!!! Right now after every time I build my project in NetBeans, I have to manually add the data files to my jar file. How do I tell NetBeans to do this automatically? I tried looking through the XML files, but that didn't seem to help too much. *EDIT: Where do I need to put resource files so that in debug mode it will work properly? thank you, tHom [Edited by - tHomahwk on April 7, 2007 5:50:42 PM]

Share this post


Link to post
Share on other sites
Advertisement
On project properties, you can add resources to the packaging of your jar file. However, I prefer to do it with ant. There are several pre-built targets (pre-compile, pre-build) that you can override, and the IDE will call them for you at the right time.

To be able to see a resource file, it must reside on your classpath, as in any java program, independent of IDE. Therefore, you either add it in a special package in your code, or as a separate file added lately to the jar file.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!