my dog learned polymorphism
The moose likes Beginning Java and the fly likes error message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "error message" Watch "error message" New topic

error message

tim hunt

Joined: Apr 19, 2001
Posts: 9
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

Joined: Apr 05, 2000
Posts: 1449
Sounds like your classpath is not set up properly and can't locate a class that your program needs.

The only reason for time is so that everything doesn't happen all at once.
- Buckaroo Banzai
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

It would help if we saw what was underneath the ******

or even post a snip of your code.
Jaime Nino

Joined: Apr 16, 2001
Posts: 4
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

Jaime Nino<br />Author of:<br /><a href="" target="_blank" rel="nofollow">An Introduction to Software Construction with Java</a>
I agree. Here's the link:
subject: error message
It's not a secret anymore!