• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no luck
 
doug shumway
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 :^)
 
An elephant? An actual elephant. Into the apartment. How is the floor still here. Hold this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic