Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

main: NoClassDefFoundError: version

Status
Not open for further replies.

HFChristie

Programmer
Oct 25, 2002
61
US
I'm installed the basic Java package (j2re-1_4_1_01-windows-i586.exe). When I do anything, I get

"Exception in thread "main" java.lang.NoClassDefFoundError: {Command}"

I was initially trying "version" as the command to confirm the install. In that case, {Command} is version.

I've looked through posts for this error, and they all mention "CLASSPATH". I haven't got anything defined in my environment (WIndows XP Professional) with that name. What would I put there if I added it manually? The only folders in the installed folder are BIN and LIB. LIB has a bunch of subfolders. Do I have to specify every single subfolder so all files are available?

Or, do I have to do something special for XP? I installed an older version (1.2) on Win2000 with no problem, but get the same error if I try that version on XP. Nothing on the site implied OS diffrences.

Thanks
 
Run 'which' on java.exe and make sure you are running the one from the JRE/bin folder.

Good luck
-pete
 
There is no JRE/Bin folder. I've got a Java/j2re1.4.1_01/Bin. But, I get the same NoClassDefFoundError message for "java which". Even if I manually change to the above BIN folder.

Figured it out. I had bad instructions (Teach Yourself Java 2). The command sjould have been "java -version", not "java version".

Thanks for the help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top