1. Java project generates jar package
(1), right-click on "Project"->"Export..." to export, and the "Export Settings" window will pop up As follows:
(2), select the file to be packaged, as shown below:
(3), settings The exported prompt information is as shown below:
(4). Specify the program entrance, as shown in the picture:
( 5). View the results, as shown in the figure:
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Mac version
God-level code editing software (SublimeText3)

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SublimeText3 Linux new version
SublimeText3 Linux latest version

Zend Studio 13.0.1
Powerful PHP integrated development environment
