My run script start.bat
java -server -Xmx1024m -Xbootclasspath/p:"/Java/Server Applet/bin" applet.Server
When I execute it from SSH terminal ./start.bat
I get this:
Exception in thread "main" java.lang.NoClassDefFoundError: applet/Server
Caused by: java.lang.ClassNotFoundException: applet.Server
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)
. Program will exit.in class: applet.Server
Yet when I login using vncviewer, and run the script it runs fine. What could be wrong?
There error seems to indicate a class path error, Java can’t find this file:
/Java/Server Applet/bin/applet/Server.class
And like Chochos writes, you can’t use any graphical (awt, swing, applet) stuff in this program if you are connect by SSH. Although that is not what this error seems to complain about.
You can use some graphic functions in SSH mode if you run Java in headless mode by adding the following command line parameter:
-Djava.awt.headless=trueBut this does not give full graphical access: