Click to See Complete Forum and Search --> : Error Message


fragile2000
June 16th, 2001, 12:01 AM
As u will see I am very new to this. Below I have pasted the following error that occurs everytime. I have set up sdk 1.3.1 exactly the way it says path & class path and cannot get past this step. If anyone knows how to fix this it is much appriciated.

Thank You,
C:\3>java helloworldapp
Exception in thread "main" java.lang.NoClassDefFoundError: helloworldapp (wrong
name: HelloWorldApp)
at java.lang.ClassLoader.defineClass0(Native Method)
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$100(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)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)

args
June 16th, 2001, 03:52 AM
Have you got a main to run the hello world application is spelling all correct

Norm
June 16th, 2001, 10:36 AM
Do you have the source file for the program you are trying to execute? Look at how the class name is spelled in the source. That name must be the same case and spelling as the filename. The error message shows you've entered a lower case name on the commandline and the Class name in the file has Capital letters. So rename the source file to have the same name exactly as the class name.

Norm