• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error message

 
tim hunt
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can someone please clarify an error message I'm getting when I try and compile some code of mine.
java.lang.NoClassDefFoundError: *******
Exception in thread "main"
 
John Wetherbie
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like your classpath is not set up properly and can't locate a class that your program needs.
John
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would help if we saw what was underneath the ******

or even post a snip of your code.
 
Jaime Nino
Author
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It could simply be a package name error. Example: all classes in the same package can use their functionality. Assume a class A in that package has by mistake a different name for the package, or no name at all; it may compile fine but other classes in that package will not be able to the members of class A. This error will be a compile error producing the message you are refering to.
------------------
Jaime Nino
Author of:
An Introduction to Software Construction with Java
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic