Signing JAR Files
This article describes the method for creating a keystore and signing JAR files.
- Create Keystore (keytool)
- Sign JAR Files (jarsigner)
Create Keystore (keytool)
Before you can sign a jar file you need a keystore. If one doesn't already exist, you can create it using the
keytool
utility. The keytool
utility is normally found under the JDK bin directory, so you may find it in several locations on your server. For example, on Oracle Application Server and WebLogic environments you would find it in at least the following locations:- OAS: $ORACLE_HOME/jdk/bin/keytool
- WebLogic: $MW_HOME/oracle_common/jdk/bin/keytool
Navigate to the users home directory.
$ cd ~ $ # Or $ cd $HOME
Use the
keytool
utility to generate the keystore. The default name for the keystore is ".keystore", but this can be overridden with the "-keystore" parameter.$ $ORACLE_HOME/jdk/bin/keytool -genkey -alias myapp -keyalg RSA -keystore .keystore_myapp Enter keystore password: mypassword What is your first and last name? [Unknown]: Joe Bloggs What is the name of your organizational unit? [Unknown]: My Department What is the name of your organization? [Unknown]: My Company What is the name of your City or Locality? [Unknown]: My City What is the name of your State or Province? [Unknown]: My State What is the two-letter country code for this unit? [Unknown]: UK Is CN=Joe Bloggs, OU=My Department, O=My Company, L=My City, ST=My State, C=UK correct? [no]: yes Enter key password for <myapp> (RETURN if same as keystore password): $
See the linked documentation for more information about the
keytool
command line syntax.Sign JAR Files (jarsigner)
Once the keystore is created, you can use the
jarsigner
utility to sign the JAR files. The jarsigner
utility is normally found under the JDK bin directory, so you may find it in several locations on your server. For example, on Oracle Application Server and WebLogic environments you would find it in at least the following locations:- OAS: $ORACLE_HOME/jdk/bin/jarsigner
- WebLogic: $MW_HOME/oracle_common/jdk/bin/jarsigner
Sign the JARs using the information from the keystore.
$ORACLE_HOME/jdk/bin/jarsigner -keystore .keystore_myapp -storepass mypassword $ORACLE_HOME/forms/java/frmall.jar myapp
See the linked documentation for more information about the
jarsigner
command line syntax.
1 comment:
My Application stock running after adding these jar files to formsweb.cfg (forms 11g) even after I signed jar files.
Post a Comment