Forums Register Login

Windows ME and Classpath

+Pie Number of slices to send: Send
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..
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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...
A timing clock, fuse wire, high explosives and a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 709 times.
Similar Threads
Basic Doubts
HelloWorld NoClassDefFoundError
possible classpath problem?
cannot run a simple Java app
Error Messages...
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:46:04.