Java generates a jar package and a single process running instance

Java file package jar run

Effective steps:

1. CMD to the current directory (for example, the directory where the default package main class is located) set classpath = the directory where the default package main class is located

2. Javac main class name java

3. Java main class name

4. Write list documents

Created by version number not known - > Enter CMD and enter Java - version

5. Jar CFM customization jar MANIFEST. MF *. class

6. Customize a bat file (batch file, i.e. the default entry, if occupied by the decompressed application)

Content: javaw - jar customization jar

7. Double click the bat file to get the two files. The two files can only be run on the computer with JDK

Extension: jar packaging with package management (only inconsistent steps are listed)

2.javac -d . *. Java (note spaces)

3. Package name in Java program Main class name

5. Jar CFM customization jar MANIFEST. Package name in MF program / * class

7. The write command with package is java - CP custom Package name in jar program Main class name

If you need to open it, close CMD and customize it in bat: start javaw - jar Jar (single process, good effect)

The above example of Java generating jar package and single process running is all the content shared by Xiaobian. I hope it can give you a reference and support more programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>