File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes NoClassDefFoundError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "NoClassDefFoundError" Watch "NoClassDefFoundError" New topic
Author

NoClassDefFoundError

Eric Gonzalez
Greenhorn

Joined: May 01, 2002
Posts: 10
I have installed j2sdk1.4.1 and JBuilder which uses jdk1.3.1.
I make te hello world program an save it at my jdk141>
bin
Hello.java
why when i try to compile I got the error java.lang.NoClassDefFoundError
* the path is well set up cause when I execute java -version from any where I got:
java version 'jdk 1.4.1' ..........
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
java.lang.NoClassDefFoundError

Usually you get this error when you try to run the program, not when you compile it. Are you compiling at the command line?
C:\>javac Hello.java
??

By the way, I suggest that you pick a different subdirectory to put your source files in. The bin subdirectory of the jdk should be kept only for the files that came with the jdk.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
From exactly what directory are you typing exactly what command and exactly where is the source file and what are your classpath and path settings (exactly)?


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Drake Silver
Ranch Hand

Joined: Apr 21, 2002
Posts: 80
hi, it's probably your JDK version.
I had the same problem until I changed the jdk version to 1.4
This is only my thought on what could be wrong, the previous posts have valid questions and responses.
good luck


"Shh, Zog....here come one Now!"
bharat nagpal
Ranch Hand

Joined: Oct 26, 2002
Posts: 76
try one thing.....
modify your classpath to...:
c:\jdk141\lib\(jar file);%CLASSPATH%;.;
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NoClassDefFoundError
 
Similar Threads
Doubt on Enums
Error while migrating from jdk1.3 to jdk1.5
compiling servlet
How to find the jdk version
problem in enhanced for loop