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

How to open java program

angryTom
Release: 2020-02-10 11:52:51
Original
23319 people have browsed it

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
Copy after login

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
Copy after login

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!

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