Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Including libraries with a JAR

807603Jan 15 2008 — edited Jan 15 2008
I'm fairly new to Java, and I use Netbeans for all of my coding. I've been developing an application which compiles and runs when using netbeans, but when I try to run it either by double clicking in windows or using 'java -jar myapp.jar', I get an error.
Exception in thread "main" java.lang.NoClassDefFoundError: com/jgoodies/looks/plastic/PlasticTheme
I'm using the JGoodies Looks library ( http://www.jgoodies.com/freeware/looks/index.html ) for a custom look and feel, and there seem to be a few people experiencing this problem. Netbeans generates the manifest file automatically, but when I look at it inside the JAR, it contains this:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.6.0_02-b06 (Sun Microsystems Inc.)
Main-Class: LockCrypt.LockCrypt
Class-Path: lib/images lib/looks-2.1.4.jar lib/mysql-connector-java-5.
 0.7-bin.jar
X-COMMENT: Main-Class will be added automatically by build
However, the two libraries I'm using are not contained within the JAR. In Netbeans, I've added them as both compile time and run time libraries, but they're not getting added to the JAR. Any help would be appreciated, from the threads I've read, no one seems to have found an answer.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 12 2008
Added on Jan 15 2008
7 comments
268 views