简体   繁体   中英

“java.lang.NoClassDefFoundError”

Exception...

<code>Exception in thread "main" java.lang.NoClassDefFoundError: org/pushingpixels/lafwidget/LafWidgetSupport
Caused by: java.lang.ClassNotFoundException: org.pushingpixels.lafwidget.LafWidgetSupport
... 3 more</code>

I get this error when trying to use the substance api by pushpixel.

Downloaded from: http://mvnrepository.com/artifact/org.java.net.substance/substance/6.0

I have tried adding the jar to the classpath, it does not work! I am using eclipse.

  1. You might not have set the classpath in environment variables

    a. use -classpath . instead

  2. The main() is not in the class you are running.

  3. If it's in a package, then you are not running it properly. eg, hello.Hello ( pkg.Class ).

i have found two group ids.. which one you are expecting. the exception clearly says the dependency from group id org.pushingpixels, but you have org.java.net.substance

<dependency>
    <groupId>org.java.net.substance</groupId>
    <artifactId>substance</artifactId>
    <version>6.0</version>
</dependency>

other from

org.pushingpixels

http://code.google.com/p/bluebell/source/browse/trunk/lib/org/pushingpixels/substance/6.1/substance-6.1.pom?r=183

EDIT- i have found this dependency too , since i dont know right version and maven dependency

http://mavenhub.com/c/org/pushingpixels/lafwidget/LafWidgetSupport/dependency

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM