Problems Executing Simple Applications

I'm trying to learn Java at the moment but am having so problems running code I created. I'm following a book call Java: How to Program and none of the programs work. They compile ok but i get the following error:

[root@localhost Java]# java Welcome1.class

Exception in thread "main" java.lang.NoClassDefFoundError: Welcome1.class

at gnu.java.lang.MainThread.run(libgcj.so.7rh)

Caused by: java.lang.ClassNotFoundException: Welcome1.class not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}

at java.net.URLClassLoader.findClass(libgcj.so.7rh)

at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh)

at java.lang.ClassLoader.loadClass(libgcj.so.7rh)

at java.lang.ClassLoader.loadClass(libgcj.so.7rh)

at gnu.java.lang.MainThread.run(libgcj.so.7rh)

[root@localhost Java]#

Can anybody help?

[945 byte] By [Rich_Forda] at [2007-11-26 16:32:57]
# 1

I'm running FC6 with JDK 6 SE. Applets execute fine, just not applications. The code of the extremely simple program is as follows:

public class Welcome1

{

public static void main( String arg[] )

{

System.out.println( "Welcome" );

}

}

Rich_Forda at 2007-7-8 22:57:33 > top of Java-index,Archived Forums,Java 2 Software Development Kit (J2SE SDK)...
# 2
When you specify the name of the main class to launch you do not need to put the .class extesion too.Try the command:java Welcome1
topfoxya at 2007-7-8 22:57:33 > top of Java-index,Archived Forums,Java 2 Software Development Kit (J2SE SDK)...
# 3
How embarrasing.......oooops. I won't tell you how many times i've uninstalledd and re-installed
Rich_Forda at 2007-7-8 22:57:33 > top of Java-index,Archived Forums,Java 2 Software Development Kit (J2SE SDK)...