Many articles on the Internet Introduce program packaging methods
I haven't felt the real meaning for a long time.
So I started it for a while.
It is easier to create a single class file.
You only need to edit it in the manifest. MF file:
Manifest-version: 1.0
Ant-version: Apache ant 1.6.5
Created-by: 1.6.0-b105 (Sun Microsystems Inc .)
Main-class: classes. jdumper. jpcapdumper (path of the main function, for example, the path of the main function is classes/jdumper/jpcapdumper. Class)
(End with the Enter key)
Put this file together with the classes folder
Go to the classes folder on the console
Enter the following command:
Jar cvfm package name. Jar manifest. MF classes (the folder to be packaged can be multiple, as long as they are separated by spaces)
In this way, the classes folder is successfully packaged.
Sometimes, we have image folders. You can also place the image path behind the folder to be packaged.
The package is successful.
Last reminder. Java programs can run without packaging them into EXE files.
If you have any questions, you can ask me, after all, I have packed it.
Rocket5725@163.com