Java Web Start Jar signing Issue?
Solution 1
You have to sign the jar file. You can do this yourself using keytool
, but if you plan on deploying this, I would recommend getting it signed by Verisign
or a company like it.
If you just need a temporary fix, signing it yourself for testing is fine.
Here is an easy to use tutorial.
Solution 2
All jars must be signed with the same signature.
Solution 3
All jars in one jnlp need to be signed with the same signature, use an extension with its own jnlp for jars that are signed by third parties.
Some jars use the original signature in the jar for crypto (the JDBC driver for SQL server) others do not work when re-signed (javahelp.jar)
You can also save the trouble signing them by including this in your application's jnlp:
<extension name="javahelp" href="javahelp.jnlp"/>
sudo
Updated on June 04, 2022Comments
-
sudo almost 2 years
I'm trying to run this Java application (jar) via Java Web Start and am having an incredibly difficult time.
Here's my current JNLP source:
<?xml version="1.0" encoding="utf-8"?> <jnlp spec="1.0+" codebase="http://localhost:8080/" href="Test.jnlp"> <information> <title>Jnlp Testing</title> <vendor>YONG MOOK KIM</vendor> <homepage href="http://localhost:8080/" /> <description>Testing Testing</description> </information> <security> <all-permissions/> </security> <resources> <j2se version="1.6+" /> <jar href="TestJnlp.jar" /> <jar href="lib/appframework-1.0.3.jar"/> <jar href="lib/junit-4.7.jar"/> <jar href="lib/org.eclipse.swt.win32.win32.x86_64_3.100.0.v4233d.jar"/> <jar href="lib/org-netbeans-modules-java-j2seproject-copylibstask.jar"/> <jar href="lib/sqlite-jdbc-3.7.2.jar"/> <jar href="lib/swing-worker-1.1.jar"/> </resources> <application-desc main-class="proteotypic.ProteotypicQuantificationApp" /> </jnlp>
Upon running the JNLP file, I get the following Error:
JNLPException[category: Launch File Error : Exception: null : LaunchDesc: ---- here the JNLP ---- at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResourcesHelper(Unknown Source) at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResources(Unknown Source) at com.sun.javaws.Launcher.prepareResources(Unknown Source) at com.sun.javaws.Launcher.prepareAllResources(Unknown Source) at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source) at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source) at com.sun.javaws.Launcher.launch(Unknown Source) at com.sun.javaws.Main.launchApp(Unknown Source) at com.sun.javaws.Main.continueInSecureThread(Unknown Source) at com.sun.javaws.Main$1.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
I have signed all the jars except
lib/org.eclipse.swt.win32.win32.x86_64_3.100.0.v4233d.jar
- if I sign that one too, I get a different exception:com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://localhost:8080/lib/org.eclipse.swt.win32.win32.x86_64_3.100.0.v4233d.jar at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source) at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source) at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source) at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source) at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source) at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source) at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) java.io.IOException: invalid SHA1 signature file digest for org/eclipse/swt/awt/SWT_AWT$4.class at com.sun.deploy.cache.CacheEntry$9.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.deploy.cache.CacheEntry.writeFileToDisk(Unknown Source) at com.sun.deploy.cache.Cache.downloadResourceToTempFile(Unknown Source) at com.sun.deploy.cache.Cache.downloadResourceToCache(Unknown Source) at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source) at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source) at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source) at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source) at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source) at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source) at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
After doing "javaws -viewer" and re-running the JNLP, I get:
-
sudo almost 12 yearsThanks or the quick reply. However, I've already signed my jar file. I've also gone through and signed all the referenced libraries except lib/org.eclipse.swt.win32.win32.x86_64_3.100.0.v4233d.jar. Any ideas?
-
Rob Wagner almost 12 yearsHmm, I'm not sure. Maybe add that to your question and someone else will be able to help! Sorry!
-
assylias almost 12 years@user1509227 Have you tried to sign that library too to see if it makes a difference?
-
sudo almost 12 yearsAfter signing that library, as well, I get the following Exception: gist.github.com/3183209 and the following "Wrapped Exception": gist.github.com/3183216