Home >Java >JavaBase >How to package java program

How to package java program

尚
Original
2019-12-27 13:25:356141browse

How to package java program

How to package java program:

1. Select the class or package you want to export in eclipse, right-click and select the Export sub-option;

2. In the pop-up dialog box, select the java file --- select JAR file and click next;

3. In the text box behind the JAR file, select the location of the jar package you want to generate. and name, be sure to check the box in front of Export generated class files and resources and Export java source files and resources, click next;

4, click the next button twice to reach the JAR Manifest Specification. Pay attention to selecting the entry class of your jar package in the text box behind the Main class at the bottom. Click Finish to complete.

You can enter the directory where your jar is located in a dos environment and run java -jar name.jar to check whether the operation is correct.

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

The above is the detailed content of How to package 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