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

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

王林
Release: 2020-02-03 11:49:54
Original
4933 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template