Java engineering into JAR packages, running jar packages with batch processing

Source: Internet
Author: User

Create a new Java project (the project in this example is called javaproject) and write the method you want to execute in main ().

Next, the project is directed into a jar package, the following steps:

Right-click the project name, select Export, select the Java runnable JAR file (e.g.)

After clicking Next, select your project name (class name-project name) in the pop-up box and select the location of the jar package upload (e.g.:)

Click on the Finish button to generate, double-click the generated jar package to run.

How to run the jar package with a. bat file Next:

Create a new Run.bat file (the filename is named), open it in Notepad, enter it (Java-jar + (the path and name of the jar package)):

Java-jar Run.jar

Once saved, you can run the jar package by double-clicking on the Run.bat file.

If you want to see the output information for the Run.bat runtime, you can add pause later:

Java-jar Run.jarpause

This will allow you to see the information printed at run time.

Java engineering into JAR packages, running jar packages with batch processing

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.