Sign jar at runtime
Hi, is possible to sign jar at runtime? We have a swing application which consist of program jars (our code) and data file (zip file which contains misc. data and image files, no class files). This data file is generated by win32 application (it is our, we also developed it). We need to run this application via Java Web Start and want to cache data file (because of file size). Program (jar) files and data (zip) file must be signed, but I don't know how to sign it without jarsigner. Jarsigner is part of the JDK and I think dependency of win32 app on JDK is no good idea. Any tips? Thanks
Message was edited by:
stepand76
[646 byte] By [
stepand76a] at [2007-11-27 6:48:14]

# 1
hiwhy do you need to sign the data part as it is in separate zip file, and java can take input a zip file and unzip that, so what is the need of signing the .zip file? regardsAniruddha
# 2
I try to simplify my problem:
I have swing aplication. I can compile it, pack it in jar and signt it. No problem. And I have win32 application which generates some resource files (images for example) packed in one zip file on server. This file have always same name and can be large (ca 20MB). Java application described above can work with this zip file (can show the images for example). Both of applications are used by my customer (not me). And I need to provide jar file and zip file by JavaWebStart because I want to use caching in JavaWebStart and not download the zip file manualy each time application started.
# 3
hello,
you can simply keep a session file where you save the crc32 value of that particular .zip file. as your file will also be in same location all the time, so you do not have to bother for that as you said. and all time you get new crc32 value download that file in temp directory, this is the same logic that i guess JNLP uses, at least i would have done in this way.
regards
Aniruddha