Prerequisites:
Environment variables need to be configured
(Video tutorial recommendation: java video)
The specific method is as follows:
First enter the location of the java file that needs to be run, such as D:\test\Test.java
and then enter
javac Test.java
Then enter
java Test
in the dos box and the running results will be output.
Recommended tutorial: java entry program
The above is the detailed content of How to run java program in dos. For more information, please follow other related articles on the PHP Chinese website!