"java Hello" Problem



Hello there,
I wrote thise helloworld code in java as Hello.java

----------------------------
public class Hello {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
------------------------------
Then i compiled it with
->javac Hello.java

It compilers normally,no error showned

I run the Hello.class file as

->java Hello
Then i get this error message:
->Exception in thread "main" java.lang.NoClassDefFoundError: hello

Plz tell me what is the error and how can i run that and other class
file.

Waiting for quick reply

Kind Regards,
Buts101

.



Relevant Pages

  • "java Hello" Problem
    ... public class Hello { ... public static void main(Stringargs) { ... It compilers normally,no error showned ...
    (comp.lang.java.programmer)
  • Re: "java Hello" Problem
    ... public class Hello { ... public static void main(Stringargs) { ... It compilers normally,no error showned ...
    (comp.lang.java.programmer)
  • Re: Question:
    ... public static void main(Stringargs) ... //also there should be a boolean method ...
    (comp.lang.java.programmer)
  • Re: When to use float (in teaching)
    ... public class Main ... {public static void main(final java.lang.Stringargs) ... In both cases float and double are working as should be expected. ...
    (comp.lang.java.programmer)
  • Re: list all files on classpath
    ... on the classpath? ... public class Main ... {public static void main(final java.lang.Stringargs) throws java.lang.Throwable ...
    (comp.lang.java.programmer)