CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Java and JSP (http://www.codingforums.com/forumdisplay.php?f=54)
-   -   AAAH! Angry face! Hello World not working! (http://www.codingforums.com/showthread.php?t=152607)

Jearb 11-19-2008 07:34 PM

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?

tomws 11-19-2008 08:22 PM

Is that the exact error? Check spelling.
Code:

HELLOWROLD
HelloWorld


Jearb 11-20-2008 12:08 AM

Yeh. :D I purposefully named the application "HELLO WROLD" just for the LOLs.

Is that throwing the error?

Oh, I would be SO angry...

_Aerospace_Eng_ 11-20-2008 03:01 AM

Quote:

Originally Posted by Jearb (Post 751677)
Yeh. :D 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.

Jearb 11-20-2008 02:02 PM

NOOOOOOOOOOOOOOO!!

ARGH I HATE YOU JAVA


Just kidding. Thanks!


All times are GMT +1. The time now is 02:14 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.