Sometimes you need to export the Java project so that it can operate elsewhere, so you don't have to stick to the development feeling to run it.
The procedure is as follows:
Select project ----> right-click, export... ---> JAVA ---> runnable JAR File
For example:
Select the graph and finish it...
Tip: sometimes our project needs to be run at a remote address, and some basic configurations, such as the port, need to be modified instead of re-engineering every time, so it is quite troublesome. We need to export some configuration files separately, so that we only need to modify the configuration file ..
Practice: Create a configuration folder in the same directory as your project SRC, and copy it separately .. send the exported jar and the file together to the user. Tell me to put the jar and config folders in the same directory ..
Exported:
Run: cmd ---> go to the jar directory you want to run.
Example: Java-jar testhelloworld. Jar
I printed the following words: Hello world!