How to open java program
1. First, open the .class file generated after compiling the source code
1) Press win r, enter cmd, open the command prompt
2) Use the cd command to enter the directory where the .class file is located, and enterjava file namecan be opened.
For example:
Hello.class
java Hello
2. Open the jar format Java program
Open the command in the same way prompt, enter the directory where the jar is located, and enter the following command
For example:
Hello.jar
java -jar Hello.jar
Recommended related articles and tutorials:java introductory tutorial
The above is the detailed content of How to open java program. For more information, please follow other related articles on the PHP Chinese website!