Find the folder where the java code is stored, then enter "cmd" in the "Search" bar above and press Enter
When the "Command Prompt" pops up, we will know that the path on our "Command Prompt" will be consistent with the path where our java code is stored
Enter the following code according to the java file name we saved to print our code, as follows:
(Related video tutorial sharing: java video tutorial)
Enter once: javac Hello.java
, and then press Enter
Enter again: java Hello
, and press Enter
The result is as shown in the figure:
Related article tutorial sharing: java introductory tutorial
The above is the detailed content of Compiling java program under cmd prompts that the file cannot be found. For more information, please follow other related articles on the PHP Chinese website!