Thursday, April 28, 2011

Netbeans: How do I let additional files be included into the created JAR?

Hello!

Netbeans doesn't allow me to specify, which files I want to have additionally included inside the JAR.

  • Can I work this around by editing the manifest.mf?
  • Or by editing build.xml?
  • What else could be done?

EDIT
I need the files to appear in jar's root (files such as LICENSE.txt or some exec script), because otherwise they wouldn't make lot sense.

From stackoverflow
  • Have you tried this tutorial or this one?

    ivan_ivanovich_ivanoff : Both these articles advice me to "hide" resources in source subfolders. I wanted some resources to be in project root (for example LICENSE.txt, or some run scripts)
    Jon Skeet : If you put it at the top level of a source folder, does it not end up in the root of the jar file?
    ivan_ivanovich_ivanoff : YES! Indeed ;) Thank you.

0 comments:

Post a Comment