File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoClassDefFoundError

 
Eric Gonzalez
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9059
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)?
 
Drake Silver
Ranch Hand
Posts: 80
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
bharat nagpal
Ranch Hand
Posts: 76
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try one thing.....
modify your classpath to...:
c:\jdk141\lib\(jar file);%CLASSPATH%;.;
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic