Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jun 2008
    Posts
    47
    Thanks
    7
    Thanked 0 Times in 0 Posts

    AAAH! Angry face! Hello World not working!

    AAH! I compiled my "Hello Wrold" app, and ran it, and it threw this error:

    Exception in thread "main" java.lang.NoClassDefFoundError: HELLOWROLD/java

    Here's my code:

    Code:
    public class HelloWorld {
        public static void main(String[] args) {
            System.out.println("Hello, world!");
        }
    }
    Is there anything I'm doing wrong? Or is my Terminal just being an idiot?

  • #2
    Senior Coder tomws's Avatar
    Join Date
    Nov 2007
    Location
    Arkansas
    Posts
    2,644
    Thanks
    29
    Thanked 330 Times in 326 Posts
    Is that the exact error? Check spelling.
    Code:
    HELLOWROLD
    HelloWorld

  • #3
    New Coder
    Join Date
    Jun 2008
    Posts
    47
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Yeh. I purposefully named the application "HELLO WROLD" just for the LOLs.

    Is that throwing the error?

    Oh, I would be SO angry...

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Quote Originally Posted by Jearb View Post
    Yeh. I purposefully named the application "HELLO WROLD" just for the LOLs.

    Is that throwing the error?

    Oh, I would be SO angry...
    Yes thats the error. The .java file needs to be the exact same name as the class name.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • Users who have thanked _Aerospace_Eng_ for this post:

    oesxyl (11-20-2008)

  • #5
    New Coder
    Join Date
    Jun 2008
    Posts
    47
    Thanks
    7
    Thanked 0 Times in 0 Posts
    NOOOOOOOOOOOOOOO!!

    ARGH I HATE YOU JAVA


    Just kidding. Thanks!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •