Bookmark Topic Watch Topic
  • New Topic

did mr. gates slay my vm

 
doug shumway
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
I'm using window 2k with 1.4.0 and I'm unable to execute "java", java/lang/NoClassDefFoundError: java/lang/Object.
My path statement is ok, javac works, so I guess it's ok. PATH=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\PROGRA~1\ULTRAE~1;C:\j2sdk1.4.0\bin;
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
doug,
Welcome to JavaRanch!
It does look as if "java" is in your path correctly (probably). Let's try to isolate the cause of your troubles. Can you do this?
1. Assuming that you are working under Windows (or can interpret this for your operating system), from the "c" drive, create a directory called "tempjr".
2. In this "tempjr" directory, create a file called "HelloWorld.java" with these contents:

3. At the command line, from the directory "tempjr", compile "HelloWorld.java" like this:
javac HelloWorld.java
If that fails, try this:
javac -classpath . HelloWorld.java
A class file named "HelloWorld.class" should now have been created in the directory "tempjr".
4. At the command line, from the directory "tempjr", run the HelloWorld program like this:
java HelloWorld
If that fails, try this:
java -classpath . HelloWorld
The program should have displayed "Hello World".
Any luck yet?
 
Dirk Schreckmann
Sheriff
Posts: 7023
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic