Skip to main content

Problem with

No replies
mikedoy
Offline
Joined: 2008-05-29

When using the new jnlp.versionEnabled property to enable version download I've come across an issue when using with the file protocol based url.

When using the file protocol for a codebase such as :

The application installs the specified jar files into cache but fails to launch the application with:
java.lang.ClassNotFoundException: hello
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:257)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:931)
at com.sun.javaws.Launcher.run(Launcher.java:121)
at java.lang.Thread.run(Thread.java:619)

hello is the name of the main class.

This does not happen when the jnlp.versionEnabled flag is not set and the file names are not encoded in the __Vx.x.x format. It Also does not happen when running through http protocol codebase URL.

It seems like the cache files are not being used when the file protocol is called out in the url. Yet the are installed in the cache. I haven't tested yet but I suspect if I had both version of the jar file (__Vx.x.x and standard named file) it would work however it would not be using the jar files from the cache as I would expect.