PDA

View Full Version : AAAH! Angry face! Hello World not working!


Jearb
11-19-2008, 07:34 PM
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:

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.
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
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!