Re: CLI Java Glitch
On 6/21/2011 5:42 PM, Tom Anderson wrote:
On Mon, 20 Jun 2011, Gene Wirchenko wrote:
Dear Java'ers:
Given
class HelloWorld
{
public static void main(String[] args)
{
System.out.println("Hello, world!");
}
}
is there any way around the following?
C:\cbs2dev\test>java helloworld
Exception in thread "main" java.lang.NoClassDefFoundError: helloworld
(wrong nam
e: HelloWorld)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: helloworld. Program will exit.
Yes:
http://fedoraproject.org/get-fedora
He would get a different exception, but still an exception, so ...
Arne