Packaging jar packages with idea

Source: Internet
Author: User

Process:

1. menu bar Select File

2.

3.

4.

5. menu bar Select Build to generate JAR file

Description

If you have an exception such as classnotfind after packaging, be aware that the 4th step extracted contains the required jar files.

Such as:

Exception in thread "main" Java.lang.noclassdeffounderror:org/apache/log4j/propertyconfigurator
At Com.boyoi.hx.main.MedicalAssistant.main (medicalassistant.java:38)
caused By:java.lang.ClassNotFoundException:org.apache.log4j.PropertyConfigurator
At Java.net.URLClassLoader.findClass (urlclassloader.java:381)
At Java.lang.ClassLoader.loadClass (classloader.java:424)
At Sun.misc.launcher$appclassloader.loadclass (launcher.java:338)
At Java.lang.ClassLoader.loadClass (classloader.java:357)
... 1 more

It is possible that the jar package is missing log4j in the 4th step.

Packaging jar packages with idea

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.