Java Engineering hits a jar package at the command line to perform slow-running problem resolution

Source: Internet
Author: User

A common Java project that connects Webserivice with CXF. Running normally under Eclipse, but using eclipse to reach the jar package, execution at the command line is unusually slow.

Some attempts have been found to be due to the wrong way of packing. There are three ways in which eclipse exports runnable jar packages, namely:

1.Extract required libraries into generated JAR

2.Package required libraries into generated JAR

3.Copy required libraries into a sub-folder next to the generated JAR

In the beginning, the second option was selected, and all the required jar packages were in the generated jar package, which was very slow to run. Then try the first and third and run normally.

Using the Unzip software to view the generated jar package, the first one is to extract the classes from the referenced jar package. The third is to put the referenced jar package in a different folder. Both of these methods work correctly.

may be related to the way in which Java's JAR commands are executed, and it remains to be seen.

Java Engineering hits a jar package at the command line to perform slow-running problem resolution

Related Article

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.