I did that. When I run javac hellodan.java. I don't see any errors.
When I run java hellodan and got an errors.
I copy from dos mode.
c:\java progrtam>javac hellodan.java
c:\java program>java hellodan
Exception in thread "main" java.lang.NoClassDefFoundError: hellodan
<wrong name: hellodan>
at java.long.ClassLoader.defineClass0(Native Method)
at java.long.ClassLoader.defineClass(ClassLoader.java:502)Native Method)
at java.security.SecureClassLoader.defineClass
(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at Java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at.java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
c:\java Program>