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
Release: 2023-06-02 21:15:43
forward
1037 people have browsed it

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: 主类名
Copy after login

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!

Related labels:
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
Latest Issues
Install JAVA
From 1970-01-01 08:00:00
0
0
0
Unable to install java
From 1970-01-01 08:00:00
0
0
0
Can java be used as the backend of the web?
From 1970-01-01 08:00:00
0
0
0
Is this in Java language?
From 1970-01-01 08:00:00
0
0
0
Help: JAVA encrypted data PHP decryption
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template