[Hello all, I've just compiled my first java application and now I'm ready to test it. However I'm just a little confused as how to go about this.
From what I've gathered thus far, I'm supposed to "execute" the source code which actually uses the class files generated by the compiler.
My environment is Windows 2008 32bit server, I have IBM's java SDK 1.6 installed.
Should the JVM be running as a "service" in Windows ? (I looked in the list of system services currently running, but i did not "see" a JVM in the list.
Of course I'm assumming the JVM would be called JVM ...
Any suggestions would be most welcome.
Hi All ... I'm still getting errors to wit:
Exception in thread "main" java.lang.NoClassDefFoundError: LU62XnsCvr (wrong name: APPC_LU62/java/LU62XnsCvr)
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.security.SecureClassLoader.defineClass(Unknown Source)
I don't understand what is meant by "wrong name" when there is indeed a class file named LU62XnsCvr.class
Volume in drive C has no label.
Volume Serial Number is B62B-74FF
Now it's my understanding that when one uses the "package" option there has to be a corresponding path that matches the package "label"
e.g. package APPC_LU62.java and I have a directory structure C:\APPC_LU62\java where the generated class files are "stored".
There's no apparent mispelling of the class name as far as I can 'see'
public class LU62XnsCvr extends Object
and in the directory itsself
05/03/2011 06:53 PM 15,230 LU62XnsCvr.class
All suggestions, ideas, and comments are most appreciated.
Your classpath needs to be set to a directory which is the root of the package; in your case, the classpath should be "C:\". That way, the Java runtime uses the classpath to look up the full name of your class, which is APPC_LU62.java.LU62XnsCvr, and which it expects to find in a directory structure that includes the directories as you have them.
Is it possible to remove your classpath altogether, and then navigate to the root of your directory structure? If there is no classpath at all, the "java" tool will default to using the current directory as its classpath.