Home  >  Article  >  Java  >  Compiling java program under cmd prompts that the file cannot be found

Compiling java program under cmd prompts that the file cannot be found

王林
王林Original
2020-02-03 11:49:544836browse

Compiling java program under cmd prompts that the file cannot be found

Find the folder where the java code is stored, then enter "cmd" in the "Search" bar above and press Enter

Compiling java program under cmd prompts that the file cannot be found

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

Compiling java program under cmd prompts that the file cannot be found

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

Compiling java program under cmd prompts that the file cannot be found

The result is as shown in the figure:

Compiling java program under cmd prompts that the file cannot be found

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What does mean in javaNext article:What does mean in java