3 Replies Latest reply: Jan 29, 2007 7:40 AM by 807596 RSS

    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??