1. the java project has not imported a third-party jar package
Packaging is simple at this time:
1. Open the project in Eclipse, right-click the project, and select "Export ";
2. Select Java/JAR file and Next;
3. In Select the resources to export, you can Select the project folder you want to include. Some unnecessary folders do not need to be put in, so as not to increase the space;
There are several options:
* Export generated class files and resources indicates that only generated. class files and other resource files are exported.
* Export all output folders for checked projects: Export all folders of the selected project
* Export java source file and resouces indicates that the exported jar package will contain your source code *. java. If you do not want to disclose the source code, do not select this option.
* Export refactorings for checked projects include some reconstructed information files.
In Select the export destination, Select the path of the exported jar, Next
4. On the next page, you can choose whether to export the *. class files containing warning warnings or error errors. Ignore him, Next
5. Configure the project on the next page. If a third-party jar package is not introduced to the project, we will use the default system option. The Main class must be set as the Main method entry class of your project)
* Generate the manifest file is used by the system to automatically Generate the MANIFEST. MF file. If your project does not reference other class-path files, you can select this item.
* Use existing mainfest from workspace. This is a custom. MF file. The format is as shown above.
* Seal content. Packet
* Main class. Here you can select your program portal. The jar package in the future will be the execution result of your portal class.
Finish. ......
This article is from the "My JAVA World" blog, please be sure to keep this source http://hanchaohan.blog.51cto.com/2996417/1295223