Use the export function provided by eclipse to generate jar files
1. Right-click anywhere in the project-export-Java-JAR file, next
2. jar file option, next
Note that the "compress the contents of the Jae file" option is used to compress the JAR file. IfProgramYou need to read and write the resource file, pay attention to whether the resource file is compressed.
3. jar package options, next
Note: "Save the description of this jar in the workspace" (Save the jar description file in the workspace) will be used when you need to change the options next time.
4. Jar configuration option, finish
Whether to generate a list file. To generate a jar executable file, select a class containing main in "Main class.
After the JAR file is finished, a jar file is generated in the specified path. If the JAR file is executable, double-click it to run it.
If the jar description file is generated, A *. jardesc file is generated in the specified path. In the workspace, right-click *. jardesc
Select "create jar" and quickly generate the JAR file according to the configuration. Select "Open jar packager" to open the jar configuration program and modify the packaging options. Therefore, when running the export jar wizard for the first time, it is best to check and save the configuration options for later modification.