Java program Packaging

Source: Internet
Author: User
Many articles on the Internet Introduce program packaging methods
I haven't felt the real meaning for a long time.
So I started it for a while.

It is easier to create a single class file.
You only need to edit it in the manifest. MF file:
Manifest-version: 1.0
Ant-version: Apache ant 1.6.5
Created-by: 1.6.0-b105 (Sun Microsystems Inc .)
Main-class: classes. jdumper. jpcapdumper (path of the main function, for example, the path of the main function is classes/jdumper/jpcapdumper. Class)
(End with the Enter key)

Put this file together with the classes folder

Go to the classes folder on the console

Enter the following command:
Jar cvfm package name. Jar manifest. MF classes (the folder to be packaged can be multiple, as long as they are separated by spaces)

In this way, the classes folder is successfully packaged.

Sometimes, we have image folders. You can also place the image path behind the folder to be packaged.

The package is successful.

Last reminder. Java programs can run without packaging them into EXE files.

If you have any questions, you can ask me, after all, I have packed it.
Rocket5725@163.com

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.