This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

anyone - please - what's wrong with my path or classpath

 
doug shumway
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens when you just type java -version on the command line?
 
doug shumway
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C:\WINNT>java -version
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
doug shumway
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
doug shumway
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no luck
 
doug shumway
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Trent DiBacco
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 :^)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic