Recently wrote a LAN project synchronization software, for team development to improve efficiency. In order to run easily with the jar command to pack a bit. You can implement click-to-run.
Map
The first step is to compile the Java files into one of your own handy folders,
The second step then switches to the current directory to make a second jar command
It's important to note that if your Java files have a form interface like mine, or have the main method. To write a manifest file for the jar package, let the jar pack know to run the class first
The manifest file is written directly in the sibling directory where the jar package is to be hit. Format: Main-class:com.bigfire.syn.watchfile (main class name, if there is a package name note with the package name) finally add a carriage return, a new line.
You can go straight to the carriage.
Okay, you can just double-click the jar package.
Java Packaging, jar command package the written program. Can click on the displayed jar package