The java virtual machine runs the jar file directly

1. Select the java file, right-click and select export--->select jar file and then click next
2. Check export generated class files and resources and export java source files and resources and
then enter the save path in jar file:
click next
3.
Click by default next, click next again, click the Browse button behind the main class,
select main method
finish

4.
Enter cmd to enter the command window
and run command: java -jar jar path

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326433118&siteId=291194637