IntelliJ: Including jars in a jar artifact

Posted by skiaddict1 on Stack Overflow See other posts from Stack Overflow or by skiaddict1
Published on 2010-05-19T07:27:32Z Indexed on 2010/05/19 7:30 UTC
Read the original article Hit count: 256

Filed under:
|
|

Developing on the Mac with IntelliJ 9.0.2.

I have a program which depends on two library jars. I have figured out how to get IntelliJ to make me a jar of my source (with the Artifact tab), and even to include the two jars in it.

However, if I get a listing of the jar file it produces, it looks like this:

com/acme/MyClass1.class
com/acme/MyClass2.class
...
mylib1.jar
myLib2.jar

And, no surprises, if I double-click the jar file, it gets a NoClassDefFoundError the first time it tries to access a class in one or other library jar.

How do I get IntelliJ to include the two library jars such that the classes are visible?

© Stack Overflow or respective owner

Related posts about intellij

Related posts about jar