I am having trouble with running my java application from the jnlp. The jnlp and the jar it is refering to are in the same directory (c:\home\jnlp_test\). The jnlp error is:
java.lang.ClassNotFoundException: spool.client.Main at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at com.sun.javaws.Launcher.doLaunchApp(Unknown Source) at com.sun.javaws.Launcher.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
The troubling part is that I can verify that the Main.class IS in the spool.jar. Furthermore I can run spool.jar from a batch file without problem. This leads me to believe that the error is with the jnlp itself.
I think the problem is with the jar file declaration
We should have just spool.jar rather than the complete path for the file. I too had similar problems and i found out that href actually tries to locate the file based on the codebase that is intially specified. So i think just mentioning spool.jar would help.
And also a "/" within the codebase something like since we are refering to a directory and we are using as a base directory for all the other references.
Hope this helps. thanks
posted 11 years ago
Thanks for the reply. I adjusted my code as you suggested, but the error still remains.