Home > Java > JavaBase > body text

How to generate java project into jar file

Release: 2020-01-09 09:48:31
Original
4497 people have browsed it

How to generate java project into jar file

1. Java project generates jar package

(1), right-click on "Project"->"Export..." to export, and the "Export Settings" window will pop up As follows:

How to generate java project into jar file

(2), select the file to be packaged, as shown below:

How to generate java project into jar file

(3), settings The exported prompt information is as shown below:

How to generate java project into jar file

(4). Specify the program entrance, as shown in the picture:

How to generate java project into jar file

( 5). View the results, as shown in the figure:

How to generate java project into jar file

How to generate java project into jar file

2. Through the jar command.

Usage: jar {ctxu}[vfm0Mi] [jar-file] [manifest-file] [-C directory] filename...

Options:

- c Create a new archive

-t List the contents of the archive

-x Expand the named (or all) files in the archive

-u Update already exists Archive

-v Generate verbose output to standard output

-f Specify archive file name

-m Contain tag information from tag file

-0 Storage mode only; ZIP compression format is not used

-M Do not generate a manifest file of all items

-i Generate index information for the specified jar file

-C Change to the specified directory and include the following files:

If a file name is a directory, it will be processed recursively.

Both the manifest file name and the archive file name Need to be specified in the same order specified by the 'm' and 'f' flags.

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

The above is the detailed content of How to generate java project into jar file. 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