Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-19-2008, 07:34 PM   PM User | #1
Jearb
New Coder

 
Join Date: Jun 2008
Posts: 47
Thanks: 7
Thanked 0 Times in 0 Posts
Jearb is an unknown quantity at this point
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?
Jearb is offline   Reply With Quote
Old 11-19-2008, 08:22 PM   PM User | #2
tomws
Senior Coder

 
tomws's Avatar
 
Join Date: Nov 2007
Location: Arkansas
Posts: 2,644
Thanks: 29
Thanked 330 Times in 326 Posts
tomws will become famous soon enoughtomws will become famous soon enough
Is that the exact error? Check spelling.
Code:
HELLOWROLD
HelloWorld
tomws is offline   Reply With Quote
Old 11-20-2008, 12:08 AM   PM User | #3
Jearb
New Coder

 
Join Date: Jun 2008
Posts: 47
Thanks: 7
Thanked 0 Times in 0 Posts
Jearb is an unknown quantity at this point
Yeh. I purposefully named the application "HELLO WROLD" just for the LOLs.

Is that throwing the error?

Oh, I would be SO angry...
Jearb is offline   Reply With Quote
Old 11-20-2008, 03:01 AM   PM User | #4
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
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!||||
_Aerospace_Eng_ is offline   Reply With Quote
Users who have thanked _Aerospace_Eng_ for this post:
oesxyl (11-20-2008)
Old 11-20-2008, 02:02 PM   PM User | #5
Jearb
New Coder

 
Join Date: Jun 2008
Posts: 47
Thanks: 7
Thanked 0 Times in 0 Posts
Jearb is an unknown quantity at this point
NOOOOOOOOOOOOOOO!!

ARGH I HATE YOU JAVA


Just kidding. Thanks!
Jearb is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:19 AM.


Advertisement
Log in to turn off these ads.