Posts Tagged ‘jarsigner’

jar resources in jnlp file are not signed by the same certificate

May 28th, 2009

As mentioned in the last post, i was working on jnlp and trying to show java applet across the web.

keytool -genkey -alias duke -keypass dukekeypasswd -keystore c:\keystore\keystore.jks

After figuring out jarsigner and keytool using the above command, i tried opening the jnlp again and got the below error:

jar resources in jnlp file are not signed by the same certificate

After looking around the net, i found Kirill Grouchnikov’s blog really useful.

jarsigner -certs -verbose -verify <jarname>.jar

The above command would verify that the jar has made up of different certs. one of them you own, the other another vendor. For most cases, the vendor would be Sun Microsystem.

thus, create another jnlp for the sun microsystem and reference it to the original one. The below shows the example of what i did for my freetts java app.

<?xml version=”1.0″ encoding=”UTF-8″?>
<jnlp spec=”1.0+” codebase=”http://137.132.146.70:8080/tts/Player/” href=”sun.jnlp”>
<information>
<title>sun</title>
<vendor>Sun Microsystems Laboratories</vendor>
<offline-allowed/>
</information>
<offline-allowed/>
<resources>
<jar href=”cmu_time_awb.jar”/>
<jar href=”freetts.jar”/>
<jar href=”en_us.jar”/>
<jar href=”cmutimelex.jar”/>
<jar href=”jsapi.jar”/>
</resources>
<component-desc/>
</jnlp>

and placed the line

   <extension name=”sun” href=”sun.jnlp” />

to the original jnlp file to reference the sun.jnlp.

and your error is solved.. =)

and here..

http://137.132.146.70:8080/tts/Player/tts.jnlp

this is what i did.. but the framework managed to come across the web.. but theres some problem with the main jar file which im looking into..

cheers. =)

VN:F [1.9.6_1107]
Rating: 10.0/10 (2 votes cast)
VN:F [1.9.6_1107]
Rating: 0 (from 0 votes)
DiggTwitterTechnorati FavoritesRedditNewsVineFacebookShare

JNLP unsigned application requesting unrestricted access to system

May 19th, 2009

Im trying to put my java app online. One example I did up is the following:

http://137.132.146.70:8080/tts/WebStartClock/clock.jnlp

The above is tried and tested. Its a freetts web clock that speaks the time.

However, you do need java on the machine to do the web app.

Currently, Im trying to do up my own app to put up online. Using the above as example, i included my jar files, etc. and i came across this error:

unsigned application requesting unrestricted access to system

Doing a few search online, i came across the solution. which was to sign your jar files using jarsigner. Hm. you can test if you can run jarsigner by running this in your command prompt.

>jarsigner.

If its not found, either 1) download java jdk 2) if you already have the jdk, include the bin directory to your path. (you can check if you have the jdk by searching for jarsigner in your computer)

To sign the jar file: below is the command

jarsigner -keystore C:\working\mystore -storepass myspass
-keypass j638klm -signedjar sbundle.jar bundle.jar jane

where j638klm  is the password and jane is the user. a more detailed document can be found here.

Hope this helps someone. =)

VN:F [1.9.6_1107]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.6_1107]
Rating: 0 (from 0 votes)
DiggTwitterTechnorati FavoritesRedditNewsVineFacebookShare
Get Adobe Flash playerPlugin by wpburn.com wordpress themes