aspose file tools*
The moose likes Beginning Java and the fly likes did mr. gates slay my vm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

did mr. gates slay my vm

doug shumway
Greenhorn

Joined: May 29, 2002
Posts: 16
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

Joined: Dec 10, 2001
Posts: 7023
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?


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Let's continue this conversation here:
http://www.coderanch.com/t/391690/java/java/anyone-please-wrong-path-or
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: did mr. gates slay my vm