Jar package using Eclipse packaging steps
Right-click on the item to be packaged-"SELECT Export"
There are two ways to pack up here.
1. If no other third-party package is used in the project, then the first one in the direct selection (JAR file)
2. If there are references to other third-party packages in the project, use the second (Runnable jar file) in the selection
This article describes the second type of
Launch configuration: Select the class of the main method to execute
Export Destination: Select Save Directory
Library handling: Select the third type, copy jar following; finish
Package completed, R1.jar in the same directory in the jar, r1_lib for the jar to be referenced. It is important to note that both must be placed in the same directory
Use:
If an environment variable is configured, it can be directly passed to the current report directory by using the JAVAC environment variable
If you do not configure environment variables, you need to go to the directory in the JDK's Bin directory where you use Javac-jar to navigate to R1.jar
Java Eclipse hits the jar package and executes the main function in the jar