Play Jar Pack and jar package run (output print information)

Source: Internet
Author: User
Tags pack

Using Eclipse to make the program a jar package, if the individual program does not use the outside third party jar package, it is easier to right-click Export->java->jar file all of next. However, if you use a third party jar package, there are some issues to be aware of when you hit the jar pack.

1 when exporting to the jar, select "Export all output folders for checked projects" and "Export Java source files and resources"

2 use Appclassloader to load the third party jar package, add the following code in MANIFEST.MF: class-path:lib/ Some.jar,lib is the same directory as Test.jar or a subdirectory, Test.jar the Some.jar package to be referenced is in this area. If you have multiple jar packages that need to be referenced: Class-path:lib/some.jar Lib/some2.jar

Each individual jar can be separated by a space. Note Use relative paths.

The jar package runs (if a third party package is required, put it under the appropriate directory):

1. Enter the DOS interface

2. Enter the path where the jar package is located (be careful not to put it on the desktop)

3. Input Java-jar ***.jar

This allows you to see the printout of the program in the DOS interface.

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.