Use the Eclipse plug-in fat jar
1. download and install the plug-in fat jar
:Http://fjep.sourceforge.net/
If you install the Eclipse plug-in, I believe everyone is familiar with it.
If the installation is successful, you can see the fat jar preferences option in window-preferences in the eclipse option bar.
2. Right-click-export-other-fat jar exporter and next in any part of the project
3. Select the project to export and click
4. Edit option, next
To generate a jar executable file, select a class containing main in "Main class.
5. Select the files and resources to be packaged and finish
Unlike the export of eclipse, the selected file is a compiled class file. For some classes, multiple class files may be generated, which makes it very difficult to select.
Save settings. Save the settings as a *. fatjar file to quickly generate a jar file or modify the configuration.
"Export ant" to export the ant file. You can use ant to build the JAR file later.