How Eclipse packages jar files (with external jar packages)

Source: Internet
Author: User

When you export a normal jar package using eclipse before the project is released, if the configuration is not good, the Java -jar /test.jar following three types of error messages may appear when you run the command:
1. The no main manifest attribute, in /test1jar Main method is not specified;
2. The Error: Could not find or load main class Main method is not specified;
3. Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/kafka/common/utils/Utils. the introduction class was not found because of a lack of dependent jar packages
There are a number of ways to export an Eclipse project with an external package jar package on the web, there are two main categories:
1. Change manifest file, this method is more complex, and there will be some problems;
2. Package with fat jar, but now that the company is closed and not serviced, the download is unsuccessful and the process of deploying the Eclipse plugin is time-consuming.
This article introduces a simple and easy-to-operate eclipse-with-a-jar package that can be packaged into an external dependency package, simple and efficient, in the following steps:
1. Right-click Project, export->java->runnable JAR file

2.->next-> Select the class that contains the main method in [Launch Configuration] and select the export path and the jar file name in [Export destination]->finish

The export is successful, and then you can deploy it directly.

How Eclipse packages jar files (with external jar packages)

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.