简体   繁体   中英

NO java.lang.NoClassDefFoundError error in Eclipse

I have a project in eclipse which was working fine untile a few minutes ago. I added a JDBC driver ad tried to run it, now even previous runnable file are giving me

Exception in thread "main" java.lang.NoClassDefFoundError: sample

Does anyone have any idea why it is happening does it have anything to do with the jar? I have even removed the jar.

Try following, one by one

  1. If you are using libraries, check whether everything is included to the project properly.
  2. Rebuild the project
  3. 'worked few minutes ago' means it used to work. Did you add any new code? Then the error is there, check whether those codes call other classes, and whether they are available
  4. Restart IDE

Once I used the following to solve the same issue

http://javarevisited.blogspot.com/2011/06/noclassdeffounderror-exception-in.html

If all above failed, that may be due to crash in JVM. I have experienced that as well.

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