Skip to main content

NoClassDefFoundError

1 reply [Last post]
akboim
Offline
Joined: 2009-12-28

Hi,
Im getting a NoClassDefFoundError Exception on using a class.
I have the source file of the class which is raising this exception ie (.java) only.
I have imported that and i'm not getting compilation errors.
What may be the reason for this when i'm not using any jar files or any .class files?

Will CLASSPATH the problem, I do not think so as the definition of class is in my src folder itself.

Can anyone please help me in this?
Thanks in advance.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ddmarx
Offline
Joined: 2007-08-17

NoClassDefFoundError often indicates an expected class that your code was compiled against is not available on the classpath when your built code is executed. It is likely that you don't have the .class file or the .jar file with the .class file of your compiled code on your classpath.

See "Java Classpath Issues" section of http://marxsoftware.blogspot.com/2009/02/day-to-day-java-development-too... for additional details and links.