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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

did mr. gates slay my vm

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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;
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Let's continue this conversation here:
https://coderanch.com/t/391690/java/java/anyone-please-wrong-path-or
 
What a stench! Central nervous system shutting down. Save yourself tiny ad!
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
    Bookmark Topic Watch Topic
  • New Topic