wood burning stoves 2.0
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

Can't even run a "Hello World" program

Jools Birch

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.
Jessica Sant

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

Joined: Jul 08, 2003
Posts: 24189

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Can't even run a "Hello World" program
It's not a secret anymore!