Home >Java >Javagetting Started >How to open java program

How to open java program

angryTom
angryTomOriginal
2020-02-10 11:52:5123316browse

How to open java program

How to open java program

1. First, open the .class file generated after compiling the source code

1) Press win r, enter cmd, open the command prompt

2) Use the cd command to enter the directory where the .class file is located, and enter java file name can be opened.

For example:

Hello.class

java Hello

2. Open the jar format Java program

Open the command in the same way prompt, enter the directory where the jar is located, and enter the following command

For example:

Hello.jar

java -jar Hello.jar

Recommended related articles and tutorials: java introductory tutorial

The above is the detailed content of How to open java program. 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