• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Windows ME and Classpath

 
Sam Smoot
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created the following file in my C:\javacode\ directory. It compiles fine, but when I execute it, i get the error message..

The error message I get:


Exception in thread "main"
java.lang.NoClassDefFoundError: HelloWorld

Is this because of my classpath or is it somthing else?
My classpath is :

SET CLASSPATH=C:\j2sdk1.4.0_01\bin;c:\javacode\

If so, How can I get the classpath corrected for Windows ME?
Thanks..
 
Sapna Korecherla
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Always the classpath should be set to the library where all the class files are stored i.e., the JavaHome/lib, where JavaHome is the dir where java is loaded.
So set ur classpath. For beginners u need not set the classpath, all the class files will b loaded in the pwd(present working directory) and it is sufficient that u set the Path to the bin direcory.
 
Sam Smoot
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, I needed to drop the final \ from the classpath Set statement (C:\javacode )..
Ah well... one day, I'll get the hang of this stuff...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic