Signing jar files - did what I was supposed to but still

Hi all,

I signed 1 jar file that has 1 class which creates a file

on c:\

I signed it like this:

keytool -genkey -keystore myKeystore -alias newKey

keytool -selfcert -alias newKey -keystore myKeystore

jarsigner -keystore myKeystore classes.jar newKey

But web start did not even prompt me for agreement

to run this code, instead I got Security Exception

Any ideas?

[438 byte] By [zivosh] at [2007-9-26 2:39:02]
# 1
do you include <security> <all-permissions/> </security> in your jnlp. This is the mechanism that supports extended security in your project once all the jars are signed
smay_gers at 2007-6-29 10:10:50 > top of Java-index,Desktop,Deploying...
# 2
Hi,Yes, I did write in the JNLP<security> <all-permissions/> </security> Sorry I did not mention it before
zivosh at 2007-6-29 10:10:50 > top of Java-index,Desktop,Deploying...
# 3
What are the details of the SecurityException getting thrown?Also, what does the rest of your JNLP file look like?erikthered
erikthered at 2007-6-29 10:10:50 > top of Java-index,Desktop,Deploying...
# 4
Hi guysI put all the data needed to figure out what went wrongwith my application,The jnlp, signed jar file, source code, code I used for signing the jar file.
zivosh at 2007-6-29 10:10:50 > top of Java-index,Desktop,Deploying...
# 5
I sorry , silly me I forgot to tell you the name of the siteIt is a site I've created specially for this http://www.geocities.com/zivoshcohen/
zivosh at 2007-6-29 10:10:50 > top of Java-index,Desktop,Deploying...
# 6
I see what you mean.I signed your code using my usual working script, and commented out the doPolicy code, without getting Security/Signature prompt.
dwmiller4 at 2007-6-29 10:10:50 > top of Java-index,Desktop,Deploying...
# 7
Replying dwmiller4:I'm sorry I did not understand.It did not any way you tried it?Do you have advice for me?
zivosh at 2007-6-29 10:10:50 > top of Java-index,Desktop,Deploying...
# 8
I've raised the number of tokens,Please try to figure out what wen't wrong with the signingI'm really stuck...
zivosh at 2007-6-29 10:10:50 > top of Java-index,Desktop,Deploying...
# 9

Couldn't read your jnlp.txt file - bad link?

Looked at your signing .bat file - looks the same as mine except for the second line (the selfcert one). Why don't you try removing this line and resigning the jar?

Not sure if this will make a difference but maybe worth a try..

John

j9archer at 2007-6-29 10:10:50 > top of Java-index,Desktop,Deploying...
# 10
I couldn't read your jnlp file, the link is bad. I had a similar problem, after hours of banging my head I realized that I had a typo in the jnlp file.JH
johampton at 2007-6-29 10:10:50 > top of Java-index,Desktop,Deploying...
# 11

Hi,

While searching for answers to my similar problem I stumbled upon your question, looked at your jnlp file and saw that it has <all-permissions> spelled wrongly.

My problem (which I have now solved) is that I signed all .jar files, but forgot to sign a .zip file :)

Best of luck,

David Durrant

ddt at 2007-6-29 10:10:50 > top of Java-index,Desktop,Deploying...