I'm unable to execute the java.exe from any directory except bin. javac works great from any directory, and java.exe does if I specify the entire path followed by the class name. here is my path statement: C:\WINNT>path PATH=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\PROGRA~1\ULTRAE~1;C:\j2sdk1.4.0\bin; here is my class path: classpath=.;c:\j2sdk1.4.0\lib; what am I missing ?
What happens when you just type java -version on the command line?
Joined: May 29, 2002
C:\WINNT>java -version Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object
Joined: Jan 07, 2002
It looks like you have perhaps moved or changed the locations of your java files since they were previously installed. At any rate, I would suggest you re-install your JDK. That would be my first troubleshooting step.
Joined: May 29, 2002
same thought, first action performed. results same problem. the reinstall first removed, than I reinstalled. really hard to imagine why javac path resolves and java path does not resolves [ May 29, 2002: Message edited by: doug shumway ] [ May 29, 2002: Message edited by: doug shumway ]
doug, How many files with the name "java.exe" are on your hard drive? Try a quick search on your drive - the file search feature probably has a link in your start menu. If more than one such file exists, are any of them located in a directory specified in your path setting that is listed before the java/bin directory? If so, I'd suggest that you delete or rename such files and/or perhaps place the java/bin listing at the beginning of your path setting. Are you having any luck?
premature response. there was another java.exe in c:\winnt\system32 ,a directory that appears prior to the 1.4 directry in the path statement. I renamed the system32 java.exe and everything is kooool. is this java.exe important and why all of a sudden the problem. is Bill G. slipping secret files into my directory structures. Thanks
If i am not mistaken your classpath is missing somthing. Your missing the java home directory. try this (this might be a tad off since i am a linux user but i think this should work for you) open your console, (start, run, command) set javahome=C:\j2sdk1.4.0 (or where ever you put it) set classpath=%javahome%;%javahome%\lib;. (period included at the end) set path=%PATH%;%javahome%/bin then try and exicute your code! if this work make the settings final by editing your autoexec for win9x family, or right click on your "My Computer" and i belive its manage if i recall, then last tab, and look for env varables somthing like that... when you install SDK for win it also installes a seperate JRE under your Program Files, this is why the command java ran and not javac!!! Go open source bro, and move to Linux :^)
subject: anyone - please - what's wrong with my path or classpath