• CONTEST ALERT - Experience the power of DDR5 memory with Kingston Click for details
Not open for further replies.
hey u guys,
im in a fix,m i got this problem with java..
Whenver i try to run a progrm, i get an error saying "NoClassDefFoundError", although the program is compiled well!!!

Plz help me, im running windows XP, java was runnning well before on XP, i lately am experiencing this problem,.....


Cyborg Agent
add a variable called CLASSPATH in your local variables indicating the location of your class file and also the jre/jdk class files.


means that your classpath is not set correctly. Make sure your JAVA_HOME is set up right before you run the startup scripts.


post you're source code,
it will help to solve you're problem & and let me know what you doing with?


FooBar Guy
for UNIX:
add this to your /etc/profile


for WinXP,
add the path to your CLASSPATH environment variable.

Notice the dot in the end... it refers to the class file that is in ur current directory...


Broken In
well i tried everything you guys suggested, but of no use

my java folder is in D:/java
bin is in D:/java/bin

all my programs which used to compile earlier no longer work! im in a fix plz helpme


If you can't compile, your PATH probably needs to be set.

c:/>set PATH=%PATH%;d:/java/bin

You can permanently set this by going to (WinXP) Start>Settings>System, Advanced tab, Environmental Variables
What do you get if you type in
java - version

If your system can't find this, it is a path problem. You can either set the path, or make it explicit:
d:/java/bin/javac MyClass.java //to compile
d:/java/bin/java -cp . MyClass //to run
Not open for further replies.
Top Bottom