Home >Java >javaTutorial >How to generate jar package in java and realize single process operation

How to generate jar package in java and realize single process operation

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBforward
2023-06-02 21:15:431009browse

java file package jar run

Effective steps:

1.cmd to the current directory (the directory where the default package main class is located, as an example ) 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 the manifest file

Manifest-Version: 1.0 
Created-By: 1.8.0 (Sun Microsystems Inc.) 
Main-Class: 主类名

created-by The version number is unknown -> Enter cmd and enter java -version

5.jar cfm custom.jar MANIFEST.MF *.class

6.custom A bat file (the batch file is the default entrance if it is occupied by the decompression application)

Contents: javaw -jar custom.jar

7. Double-click the bat file to get the two above The file can only be run on a computer with jdk installed

What are the basic data types of java

The basic data types of Java are divided into:

1. Integer type, used to represent Integer data type.

2. Floating point type, a data type used to represent decimals.

3. Character type. The keyword of character type is "char".

4. Boolean type is the basic data type that represents logical values.

The above is the detailed content of How to generate jar package in java and realize single process operation. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete