S
shahsachin
I have an application which I want to start through Java Web Start. Now
I also have some other plugin jars which are eventually loaded and used
by the main application. When I run the application stand-alone, it
works fine and also loads all the plugin jars flawlessly.
Now comes most annoying part.... I try the same through web start... I
signed all the jars and on the server the directory structure looks
like following...
htdocs/
mainapp.jar
mainapp.jnlp
jars/
plugin1.jar
plugin2.jar
plugin3.jar
after clicking the jnlp link, the main app loads up fine, but when i
try to bring up any of the plugins, I get the following exception
(which works fine if I run the stand alone):
java.util.zip.ZipException: The system cannot find the path specified
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at mynamespace.PluginUIHelper.getPluginUIClass(PluginUIHelper.java:64)
The code snippet from PluginUIHelper.java looks like this:
......
62 if (serviceImpl.toLowerCase().endsWith(".jar")) {
63 try {
64 jarFile = new JarFile(serviceImpl);
65 } catch (IOException e) {
66 e.printStackTrace();
67 return null;
68 }
69
70 Manifest manifest = null;
71
72 try {
73 manifest = jarFile.getManifest();
74 } catch (IOException e) {
75 e.printStackTrace();
76 return null;
77 }
.......
So can anyone tell me what might be going wrong here? I had a similar
issue with the resource files, but it is solved by using
getClass().getClassLoader().getResource()
I am not sure if there is a similar way for solving dependent jar files
too. I will appreciate your help.
Thank you
Sachin
I also have some other plugin jars which are eventually loaded and used
by the main application. When I run the application stand-alone, it
works fine and also loads all the plugin jars flawlessly.
Now comes most annoying part.... I try the same through web start... I
signed all the jars and on the server the directory structure looks
like following...
htdocs/
mainapp.jar
mainapp.jnlp
jars/
plugin1.jar
plugin2.jar
plugin3.jar
after clicking the jnlp link, the main app loads up fine, but when i
try to bring up any of the plugins, I get the following exception
(which works fine if I run the stand alone):
java.util.zip.ZipException: The system cannot find the path specified
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at mynamespace.PluginUIHelper.getPluginUIClass(PluginUIHelper.java:64)
The code snippet from PluginUIHelper.java looks like this:
......
62 if (serviceImpl.toLowerCase().endsWith(".jar")) {
63 try {
64 jarFile = new JarFile(serviceImpl);
65 } catch (IOException e) {
66 e.printStackTrace();
67 return null;
68 }
69
70 Manifest manifest = null;
71
72 try {
73 manifest = jarFile.getManifest();
74 } catch (IOException e) {
75 e.printStackTrace();
76 return null;
77 }
.......
So can anyone tell me what might be going wrong here? I had a similar
issue with the resource files, but it is solved by using
getClass().getClassLoader().getResource()
I am not sure if there is a similar way for solving dependent jar files
too. I will appreciate your help.
Thank you
Sachin