Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Early Access

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
Print Button
 
[*] JavaTM Cryptography Extension (JCE) 1.2.1 Early Access Release

Installation Instructions

  1. Download JCE 1.2.1. You can save the downloaded file anywhere on your local disk.

    Note that JCE 1.2.1 requires that you have Java® 2 SDK v.1.2 or later or Java® 2 Runtime Environment v.1.2 or later already installed.

  2. Uncompress and extract the downloaded file. This will create a directory named jce1.2.1, with two subdirectories named doc and lib.

  3. JCE 1.2.1 is supplied as an extension (also known as an "optional package") to the Java 2 platform.

    The lib subdirectory extracted in the previous step contains the jce1_2_1.jar and sunjce_provider.jar files. The lib subdirectory should also contain JAR files for jurisdiction policy files: US_export_policy.jar and local_policy.jar. You should move or copy all these JAR files to the standard place for the JAR files of an installed extension:

    <java-home>\lib\ext			[Win32]
    <java-home>/lib/ext			[Solaris]
    

    Here <java-home> refers to the directory where the runtime software is installed, which is the top-level directory of the JRE or the jre directory in the Java® 2 SDK software. For example, if you have Java® 2 SDK v.1.2 installed on Solaris, you need to install the JAR files in the following directory:

    jdk1.2/jre/lib/ext
    
    Similarly, if you have Java® 2 Runtime Environment v.1.2 installed on Solaris, you need to install the JAR files in the following directory:
    jre1.2/lib/ext
    

  4. Register the "SunJCE" provider.

    JCE 1.2.1 comes standard with a Cryptographic Service Provider, or "provider" for short, named "SunJCE". Although the "SunJCE" provider is supplied with every JCE 1.2.1 installation, it still needs to be configured explicitly: either statically or dynamically, before its services can be accessed:

    • Static registration of SunJCE provider

      Add the "SunJCE" provider to your list of approved providers. This is done statically by editing the security properties file

      <java-home>\lib\security\java.security         [Win32]
      <java-home>/lib/security/java.security         [Solaris]
      
      Here, as in the previous step, <java-home> refers to the directory where the JRE was installed. For example, if you have Java® 2 SDK v.1.2 installed on Solaris, you need to edit the following file:
      jdk1.2/jre/lib/security/java.security
      
      Similarly, if you have Java® 2 Runtime Environment v.1.2 installed on Solaris, you need to edit this file:
      jre1.2/lib/security/java.security
      

      One of the types of properties you can set in java.security is of the following form:

          security.provider.n=providerClassName
      

      This declares a provider, and specifies its preference order n. The preference order is the order in which providers are searched for requested algorithms (when no specific provider is requested). The order is 1-based; 1 is the most preferred, followed by 2, and so on.

      Add the above line to java.security, replacing providerClassName with com.sun.crypto.provider.SunJCE, and substituting n with the priority that you would like to assign to the "SunJCE" provider.

      For example, if you would like to configure "SunJCE" as your second preferred provider, you add the following line to the java.security file:

          security.provider.2=com.sun.crypto.provider.SunJCE
      
    • Dynamic registration of SunJCE provider

      Add the following lines of code at the beginning of your program:

          Security.addProvider(new com.sun.crypto.provider.SunJCE());
      

CHANGES | README | LICENSE | INSTALL | FAQ | KNOWN BUGS | SUBMIT BUGS



Print Button
[ This page was updated: 1-Mar-2000 ]
Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary - Applets - Tutorial - Employment - Business & Licensing - Java Store - Java in the Real World
FAQ | Feedback | Map | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-2000 Sun Microsystems, Inc.
All Rights Reserved. Terms of Use. Privacy Policy.