# JCSI - Installation

These are the steps required to configure the Java development and deployment environment to use the JCSI security provider classes and com.dstc.security.* packages.

Step 1. | Configure the environment variables:
$JCSI | Directory where JCSI has been installed. [eg. C:\JCSI (Windows) or /usr/local/jcsi (Unix) ]
$JAVAHOME | JDK/JRE 1.2.x or 1.3.x root directory
Step 2. | Copy the $JCSI/lib/*.jar files into the $JAVAHOME/jre/lib/ext directory. The $JAVAHOME/jre/lib/ext directory may need to be created if it does not already exist.
Step 3a. | Edit $JAVAHOME/jre/lib/security/java.security and add the JCSI security providers in the following sequence:
    #
    # List of providers and their preference orders (see above):
    security.provider.1=sun.security.provider.Sun

    # DSTC Providers
    security.provider.2=com.dstc.security.provider.DSTC
    security.provider.3=com.dstc.security.keymanage.keystore.DSTC
    security.provider.4=com.dstc.security.x509.DSTC
Note that the base Sun provider `sun.security.provider.Sun` is preserved. JDK/JRE 1.3.x also includes the new provider `com.sun.rsajca.Provider`. If you include the rsajca provider we suggest you place it after the jcsi to avoid a bug in the rsajca provider
Step 3b. | Edit $JAVAHOME/jre/lib/security/java.security to change the default keystore format from "jks" to "pkcs12":
    #
    # Default keystore type.
    #
    # keystore.type=jks
    keystore.type=pkcs12