I have a student who has installed JDK1.3.1 and TextPad on his computer which is running WindowsXP. He can successfully compile his programs but when he tries to run them he gets a NoClassDefFound error. I have other students who are using WindowsXP with no difficulty. Any ideas on how to fix. I am stumped. Thank you very much.
Barb
JDK1.3.1 NoClassDefFound Error
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Re: JDK1.3.1 NoClassDefFound Error
I had a similar problem myself.
What I had to do was update the path system variable, to show the path to the jdk install directory.. more specifically
C:\j2sdk1.4.1_01\bin;
this may be different on your students computer.. but it must be the path to the /bin directory.
The trick is though, that it's not enough to just put that in the path variable, you have to also end the path variable with a semicolon ( ; )
ie/
PATH
otherpathstuff;C:\j2sdk1.4.1_01\bin;
apparently it doesn't work without the semicolon there.
I also have a CLASSPATH variable with the value C:\j2sdk1.4.1_01\jre\lib\rt.jar;
If he doesn't have that as a system variable, try adding that, and see if it makes a difference.
I don't remember if that was required for the jdk, or so i could get jikes to run, which is an alternative java compiler. If neither of those options help, I don't have any idea what to do. Hope that helps.
Environmental variables in XP can be accessed through the System Properties dialog window (right click MyComputer > Properties, on the advanced tab.)
What I had to do was update the path system variable, to show the path to the jdk install directory.. more specifically
C:\j2sdk1.4.1_01\bin;
this may be different on your students computer.. but it must be the path to the /bin directory.
The trick is though, that it's not enough to just put that in the path variable, you have to also end the path variable with a semicolon ( ; )
ie/
PATH
otherpathstuff;C:\j2sdk1.4.1_01\bin;
apparently it doesn't work without the semicolon there.
I also have a CLASSPATH variable with the value C:\j2sdk1.4.1_01\jre\lib\rt.jar;
If he doesn't have that as a system variable, try adding that, and see if it makes a difference.
I don't remember if that was required for the jdk, or so i could get jikes to run, which is an alternative java compiler. If neither of those options help, I don't have any idea what to do. Hope that helps.
Environmental variables in XP can be accessed through the System Properties dialog window (right click MyComputer > Properties, on the advanced tab.)
Re: JDK1.3.1 NoClassDefFound Error
Mrs. Kline,
I found out how to fix the problem. Go to system properties, then go to the Advanced tab, then select environment variables. Now change the classpath to the following:
"dot" "semicolon" (.
Remove anything else from the classpath entry.
I found out how to fix the problem. Go to system properties, then go to the Advanced tab, then select environment variables. Now change the classpath to the following:
"dot" "semicolon" (.
Remove anything else from the classpath entry.
Re: JDK1.3.1 NoClassDefFound Error
compare the machine's classpath setting and note any differences.