aspose file tools*
The moose likes Beginning Java and the fly likes Can't even run a Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Can Watch "Can New topic
Author

Can't even run a "Hello World" program

Jools Birch
Greenhorn

Joined: Nov 01, 2003
Posts: 6
I can compile but can't even run a "Hello World" program.

The CLASSPATH and PASS are correct.
When i run the .class file I get this message:
Exception in thread "main" java.NoClassDefFoundError: saluton (wrong name: Saluton)
at java.lang.ClassLoader.defineClass()(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Please help me as this is very frustrating, I've read tutorials elsewhere and they either don't explain specifically this error or it is too hard for me to understand.
Thanks.
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

no worries -- you've come to the right place.
Remeber: Java is case-sensitive. Meaning the word blah is different than Blah is different than BLAH.
So.... lets look at your error message:
Exception in thread "main" java.NoClassDefFoundError: saluton (wrong name:Saluton)
When you try to execute the class, make sure you use the correct case:
javac Saluton.java
java Saluton
Let us know if you have any more problems!


- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Mr. Fortran,
We don't have many rules round these parts, but we do have our naming policy, which doesn't allow obviously made-up names. Most of us here use our real names, anyway, but it should at least sound real. Please head over here and change yours right away.
Thanks, parder, and hope to see you round the Ranch!


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can't even run a "Hello World" program