Java Packaging, jar command package the written program. Can click on the displayed jar package

Source: Internet
Author: User

Recently wrote a LAN project synchronization software, for team development to improve efficiency. In order to run easily with the jar command to pack a bit. You can implement click-to-run.

Map

The first step is to compile the Java files into one of your own handy folders,

The second step then switches to the current directory to make a second jar command

It's important to note that if your Java files have a form interface like mine, or have the main method. To write a manifest file for the jar package, let the jar pack know to run the class first

The manifest file is written directly in the sibling directory where the jar package is to be hit. Format: Main-class:com.bigfire.syn.watchfile (main class name, if there is a package name note with the package name) finally add a carriage return, a new line.

You can go straight to the carriage.

Okay, you can just double-click the jar package.

Java Packaging, jar command package the written program. Can click on the displayed jar package

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.