Using directives in CMD to execute JAR packages

Source: Internet
Author: User

Overview:

Today there is a requirement to execute the. jar file in cmd


Practice:1. Create Your Hello world


2. Export to Jar package


3. Open your successful exported jar package


4. Open the folder



5. Edit the following :


Here are three points of attention.

1.class: There must be a space behind

2. The path of the master file must be written in full

3. There must be a line break in the above main


6. Running

Haha, already OK ~


7. Expansion

If you're not feeling perfect here, you need to pass in some extra parameters for extra action. Then you can do the following to improve the operation.


Run the steps and effects such as:

Yes, there's one more thing to watch out for, that's it. Do not use commas between the parameters behind the jar file, but spaces

Using directives in CMD to execute JAR packages

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.