Daily one Java----------jar command

Source: Internet
Author: User

You can use the JAR command to package a Java program.


JAR Command format:

jar {c T x u f}[v m 0 m I] [jar-file] files ...


Parameter meaning:

C: Create a JAR Package

T: Displays a list of the contents of the JAR package

X: Unzip the jar package

U: Add file to Jar package

F: Specify the file name of the jar package


V: Detailed production report, on-screen output

0: When generating jar packages, do not compress

I: Create an index file for the specified jar package

M: Contains inventory information from the specified manifest file

M: Do not create a manifest file for the entry


Example: 1 Creating a jar Package

Jar CVF Hello.jar Helloworld.class

2 Show Jar Package

Jar TVF Hello.jar

3 Unpacking the JAR package

Jar XVF Hello.jar

4 adding new content to existing jar packages

Jar UF Hello.jar Helloworld.java




Daily one Java----------jar command

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.