"C:\Program Files\Java\jdk1.6.0_06\bin\javac" C:\pw\NCClient.java
java -classpath NCClient netconnect.properties
I am trying to use the above command line, in a batch file, to run NCClient with the netconnect.properties as a properties file. It is giving me the noclassdefound error. I've tried it a hundred different ways but it won't work. It compiles but then complains that it can't fine netconnect.properties.
ANy help would be appreciated. Following is the error it is giving me.
U:\>"C:\Program Files\Java\jdk1.6.0_06\bin\javac" C:\pw\NCClient.java
C:\pw\NCClient.java:8: warning: sun.misc.BASE64Encoder is Sun proprietary
d may be removed in a future release
import sun.misc.BASE64Encoder;
^
C:\pw\NCClient.java:150: warning: sun.misc.BASE64Encoder is Sun proprieta
and may be removed in a future release
BASE64Encoder base64encoder = new BASE64Encoder();
^
C:\pw\NCClient.java:150: warning: sun.misc.BASE64Encoder is Sun proprieta
and may be removed in a future release
BASE64Encoder base64encoder = new BASE64Encoder();
^
Note: C:\pw\NCClient.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 warnings
U:\>java -classpath NCClient c:\pw\netconnect
Exception in
thread "main" java.lang.NoClassDefFoundError: c:\pw\netconne
Caused by: java.lang.ClassNotFoundException: c:\pw\netconnect
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)