Sunday, October 22, 2006

Create a signed jar

Create a signed Jar file

description:
need to use keytool and jarsigner

C:\> keytool -genkey -validity
C:\> keytool -selfcert -validity -keypass
C:\> jarsigner test.jar mykey

http://www.ccw.com.cn/htm/center/prog/02_7_8_4.asp
http://www.owasp.org/index.php/Signing_jar_files_with_jarsigner#Create_a_new_DSA_Key_Pair_for_Bob

Not all the detail, it will be edit later but you can use the upper command to finish it.

signed jar for web start application.

Ant jar file ( Do you remember the script? )

Very simple Ant to create jar file

*project name="XDoclet Generator" default="jar"*
*target name="jar" description="Create binary distribution after xxx"*
*!-- Create application JAR file --*
*mkdir dir="MyJarDir"*
*jar jarfile="MyJarDir/MyJarFile.jar" basedir="classes"*
*/jar*
*/mkdir*

Simple easy under stand but let me write down.... thx. I easy forget