i cannot run java!!

Using the Java SDK with TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
bnguyen25
Posts: 3
Joined: Sun Feb 22, 2004 8:28 pm
Contact:

i cannot run java!!

Post by bnguyen25 »

I create the program called hello

class Hello {
public static void main( String args[] ) {
System.out.println( "hello world" );
}
}

compile is fine but i cannot run in textpad

error i get: Exception is "main" no classdefound error....... hello ( wrong name) and bunch of error
at Java.net.classloader
at java.net.urlclassloader
at java.net.laucnher



i been trying for hours but cant seem to fix the problem , help thanks
User avatar
talleyrand
Posts: 624
Joined: Mon Jul 21, 2003 6:56 pm
Location: Kansas City, MO, USA
Contact:

Post by talleyrand »

I'll wager hello is not the wrong name. The name of the file is case sensitive, even if the underlying OS is not case sensitive. In other words, rename the file to Hello.java and see where that gets you.
I choose to fight with a sack of angry cats.
bnguyen25
Posts: 3
Joined: Sun Feb 22, 2004 8:28 pm
Contact:

Post by bnguyen25 »

OMG , problem solved!

thanks :lol:

so happy
Post Reply