File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes NoClassDefFoundError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "NoClassDefFoundError" Watch "NoClassDefFoundError" New topic


igwe kalu kalu ogba
Ranch Hand

Joined: Feb 03, 2005
Posts: 133
Hello, I have this strange problem. My jdk worked perfectly last week. However now, I can still compile files with javac, and if I type java in my command line (shell) it is recognized and a list of different uses of java is listed. However, When I try to run my files I get this error:

java.lang.NoClassDefFoundError : getPayXML

Where getPayXML is the name of the class I just compiled. I really dont understand this. Can anyone help me with this? I have java_home set. Thanks.
Bajji Pat
Ranch Hand

Joined: Apr 05, 2005
Posts: 50
Probably a classpath problem!! Did u try setting the classpath??

Could u pls post the code??
[ June 13, 2005: Message edited by: Bajji Pat ]
santosh borse

Joined: Jun 07, 2005
Posts: 7

Denitely it is a path problem, just remove the settings made by u in classpath and compile and rum again.

igwe kalu kalu ogba
Ranch Hand

Joined: Feb 03, 2005
Posts: 133
Thanks, it works now. It seems that some program or person overwrote my classpath. I changed it to read classpath = .

Richard Anderson
Ranch Hand

Joined: May 20, 2005
Posts: 61
I'd recommend a class name that doesn't look like a method as well ;-)

-Rich, SCJP 1.4
I agree. Here's the link:
subject: NoClassDefFoundError
It's not a secret anymore!