Home  >  Article  >  Java  >  How to run java files

How to run java files

尚
Original
2019-11-20 10:21:595968browse

How to run java files

Executing java on the command line is very important, whether in development or testing. It is a process to use cmd command to compile, execute and package java files. Here we only describe the compilation and execution process.

First create a txt, change it to test.java

How to run java files

Write code, and the output is hollow

How to run java files

Find cmd and open cmd

How to run java files

Compile the java file and enter the command javac test.java

How to run java files

If no error is reported, check whether there is a class file in the current directory.

How to run java files

Execute the class file, enter java test in the command, and the output is hollow

How to run java files

For more java knowledge, please pay attention to java basic tutorial.

The above is the detailed content of How to run java files. 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 is java gcNext article:what is java gc