Home >Java >Javagetting Started >How java files are run
First you need to prepare a jdk and copy the bin directory of the jdk, as shown below:
Then set the PATH environment variable Add the bin directory of the JDK, as shown in the following figure:
Open the CMD command line, and use the javac command to compile the java file, as shown in the following figure:
Finally, use the java command to execute the compiled java file, as shown in the figure below:
Complete!
Recommended tutorial: Getting started with java development
The above is the detailed content of How java files are run. For more information, please follow other related articles on the PHP Chinese website!