Use jar commands to generate jar and war files

Source: Internet
Author: User

# Compress java files and compress them into jar packages
1. Open (directory of the CD Java file)
2. Configuration
Set Path = directory of JDK 1.5.0 _ 05/bin under drive C-your own JDK installation directory
Set classpath =. -- current path
3. Packaging:
Jar cvf tt. Jar./-- (./indicates all files in the current file)
4. The generated jar cannot be run. Release it,
Generate a folder named META-INF, open the append main-class: package name. Class Name -- (: must have spaces after)
5. Package again
Jar cvfm package name. Jar./meta-INF/manifest. MF./-- (there must be a space after MF ,./)
6. You can pull it !! Pai_^

# Compress java files and compress them into war packages

1. Open the folder to be packaged (CD directory)
2. Configuration
Set Path = directory of JDK 1.5.0 _ 05/bin under drive C-your own JDK installation directory
Set classpath =. Current path
3. Jar cvf tt. War./-- (./indicates all files in the current file)

 

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.