The Packaging panel enables
you to set up the filter for which files are included in the JAR file.
You open the Standard Java SE Project Properties dialog box by right-clicking
any
and choosing Properties.
The Packaging panel includes the following options:
Jar File.
This text field shows the location of JAR files for this project (relative to your project location). The default value is <your_project_location>/dist. To change the JAR name and location, open the project.properties file and edit the dist.jar property.
Exclude from JAR File. Specify the files that should be excluded from the JAR file during the packaging process. By default, this field contains the values **/*.java, **/*.form. For example, to exclude the .properties file from the JAR file, add **/*.properties at the end of the existing value.
Compress JAR File. If selected, the resulting JAR file will be compressed.
Build JAR after Compiling.
If selected, the IDE builds a JAR file from your project sources each time during compilation and places it to the specified location (see the Jar File field). If you clear this checkbox, the Java compiler will produce only .class files, without building JAR files for the application.
Notes:
To specify a manifest file in your JAR file, open your project's project.properties
file and enter the name of the manifest file in the manifest.file
property. The file name must be specified relative to the project's build.xml
file.
To disable building of JAR files for a project, open build.xml, override
the jar target and remove all the dependencies from the target, like
so: