This article is reproduced in: http://blog.163.com/dra_gon_520@126/blog/static/63456321201031411837757/
1. Centralize the prepared package of. java files into one directory such as C:\source
2. Create a directory that holds. class files such as C:\class
3. Use command javac-d class Source\*.java in C-Packing directory
Compiles all. Java source files under the source folder, and the generated. Class bytecode files are placed in the class directory
4. Execute jar CVF Abc.jar *.* in class directory
Pack all the files into Abc.jar files
5. Extract META-INF/MANIFEST.MF Files
Execute jar XFM Abc.jar META-INF/MANIFEST.MF
Just pull out the file manifest.mf
Edit this file
Join Main-class:font2dtest on the last line
Where Font2dtest is the name of the class that contains the main function in your own class
If you have a package name, you should bring the package name as test. Font2dtest
6. Update the META-INF/MANIFEST.MF file in the jar package
Execute jar UFM Abc.jar META-INF/MANIFEST.MF
Warnings can be ignored
7. Okay, now the Abc.jar can run directly.