I am getting the following error when I try to run my .class file. Can anyone help me why am I getting this? C:\fleet\modified fleet>java com\trilogy\ford\europe\fleet\client\ECupidSOAPClientImpl Exception in thread "main" java.lang.NoClassDefFoundError: com\trilogy\ford\europe\fleet\client\ECupidSOAPClientImpl (wrong name: com/trilogy/ford/europe/fleet/client/ECupidSOAPClientImpl) 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$1(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)
Cheers,<br />Rani<br />SCJP, SCWCD, SCBCD
Joined: Feb 06, 2001
I may be doing something stupid but I really can't figure out. I tried to simplify my code in order to know the reason still I am getting the same error.
Originally posted by parmeet bedi: > But why didn't it worked with the '\' ? I don't know the exact reason behind it but that's just the way the JVM expects you to identify the class you are trying to run in it. You have to remember, "java" is the program you are running and the rest are command line parameters. Also, "." follows the Java package identifier format and is more platform-independent than "\". You obviously are running under DOS but in Unix it is "/", in some other platform it could be something else. Using "." makes it uniform across all platforms.