C H A P T E R 2 |
Installation |
This release is
provided for the Solaris Operating System (Solaris OS) release 10, SuSE Linux,
and Microsoft Windows XP as compressed zip archives. This release was
built using gcc version 3.2.3 on
Windows, 3.2.2 on Linux, and Sun
Studio 10: C 5.7 Compiler on
Solaris. The GNU Compiler Collection, gcc,
can be obtained at http://gcc.gnu.org.
Note - Do not overlay this release onto a previous release. Instead, perform the installation into a new directory. |
Be sure to install the binary release before installing the source release, which you must download separately.
1. Install the Java 2
Standard Edition (J2SE
) Software Developer's Kit (SDK).
It is available from http://java.sun.com/j2se.
The supported SDK version is 1.5. If you are installing the SDK on the Solaris 10 or Linux platform, make sure that all of the required patches are installed. More information is available in the product documentation available at http://www.sun.com/software/solaris.
2. (Optional) Install javax.comm.
If, however, you are planning to use the development kit to communicate with a TLP224-compatible card reader, you must install javax.comm.
javax.comm can be found in the Java
Communications API 2.0, available on Sun's web site at: http://java.sun.com/products/javacomm.
Separate versions of the javax.comm API are available for the Solaris SPARC® technology and Microsoft Windows platforms.
Note - If you are using the development kit on the Linux platform, download the Solaris platform release of the javax.comm API and install only the Java Archive (JAR) files. |
There are three main steps for installing the development kit binaries. Separate sections cover installation for the Solaris, Linux, and Microsoft Windows platforms.
1. Installing development kit binary release files. See Installing on the Solaris or Linux Platform or Installing on the Microsoft Windows Platform.
2. Setting environment variables. See Setting Environment Variables for the Solaris or Linux Platform or Setting Environment Variables for Microsoft Windows Platform.
3. Installing Apache Ant and the Ant tasks bundle. See Installing Ant.
|
The Java Card development kit provides separate download files for the binary release for the Solaris and Linux platforms.
1. Save the file in a convenient installation location of your choice.
For example, you might save the file in the directory /javacard. You must not install this release into an existing directory structure from a previous release.
2. Navigate to the directory where you saved the file.
In our example, navigate to /javacard directory with the following command:
% cd /javacard
3. Unzip the file provided with the release with the unzip utility.
% unzip DevelopmentKitBinaryDistribution.zip
where DevelopmentKitBinaryDistribution refers to the name of the bundle containing the binary release installation files for the Solaris or Linux platform.
The release's release documents, such as the release notes, are unzipped into the directory /javacard as well. The installation creates the subdirectory java_card_kit-2_2_2 under /javacard. The /javacard/java_card_kit-2_2_2 directory is now the root of the development kit installation.
4. Unzip the files in the directory java_card_kit-2_2_2.
Within the directory java_card_kit-2_2_2, you will find other zip files to unzip. Unzip all of these into the java_card_kit-2_2_2 directory. For a description of the files and directories that are installed under java_card_kit-2_2_2, see Files Installed for the Binary Release.
5. Follow the directions in the next section to set the environment variables required by the development kit.
|
1. Set the environment variable JC_HOME to the installation directory.
For example (using csh), if you unzipped the release in the directory /javacard, use the following command:
setenv JC_HOME /javacard/java_card_kit-2_2_2
If you unzipped the installation into a different directory, define the environment variable JC_HOME accordingly.
2. Set the environment variable JAVA_HOME to the directory where you installed your Java technology development tools.
For example, setenv JAVA_HOME /usr/j2sdk1.5
The following optional path setting enables you to run the development kit tools from any directory.
setenv PATH .:$JC_HOME/bin:$PATH
To automate these environment settings, create a csh script file (named, for example, javacard_env.cshrc) that includes the setenv statements:
setenv JC_HOME /javacard/java_card_kit-2_2_2
setenv JAVA_HOME /usr/j2sdk1.5
setenv PATH .:$JC_HOME/bin:$JAVA_HOME/bin:$PATH:
Run the script file from the command prompt before running the development kit tools, samples, and demonstrations (refer to Chapter 3):
% source javacard_env.cshrc
|
The Java Card development kit provides a separate download file for the binary release for the Microsoft Windows XP platform.
1. Save the zip file in a convenient installation location of your choice.
For example, the root of the C: drive.
2. Unzip the file provided with the release with the Winzip utility.
The utility is
available from http://www.winzip.com.
Use the following command to unzip the file:
C:\> winzip32 DevelopmentKitBinaryDistribution.zip
where DevelopmentKitBinaryDistribution refers to the name of the bundle containing the installation files for the Microsoft Windows platform.
In the Winzip dialog, choose Select All and Extract from the Actions menu. Enter C:\ into the Extract To field to unzip the contents of the zip file into that directory. For more information on unzipping files, refer to the Winzip documentation. The release's release documents, such as the release notes, are unzipped into that directory as well.
The java_card_kit-2_2_2 directory is the root of the development kit installation.
3. Unzip the files in the directory java_card_kit-2_2_2.
Within the directory java_card_kit-2_2_2, you will find other zip files to unzip. Unzip all of these into the java_card_kit-2_2_2 directory. For a description of the files and directories that are unzipped into java_card_kit-2_2_2, see Files Installed for the Binary Release.
4. Follow the directions in the next section to set the Microsoft Windows platform environment variables required by the development kit.
|
1. Set the environment variable JC_HOME to the installation directory.
For example, if you unzipped the release in the root directory of the C: volume, enter this command:
set JC_HOME=c:\java_card_kit-2_2_2
If you unzipped the installation into a different directory, define the environment variable JC_HOME accordingly.
2. Set the environment variable JAVA_HOME to the directory where you installed your Java software development tools.
For example, the command will use the following format:
set JAVA_HOME=c:\j2sdk1.5
The following optional path setting enables you to run the development kit tools from any directory.
set PATH=%JC_HOME%\bin;%JAVA_HOME%\bin;%PATH%
To automate these environment settings, create a batch file (named, for example, javacard_env.bat) that includes the set statements:
@echo off
set JC_HOME=C:\java_card_kit-2_2_2
set JAVA_HOME=c:\j2sdk1.5
set PATH=.;%JC_HOME%\bin;%JAVA_HOME%\bin;%PATH%
Run the batch file from the command prompt before running the development kit tools, samples, and demonstrations (refer to Chapter 3).
|
The development kit requires Ant to run the tools and the demos. Once Ant is installed and the Ant tasks bundle unzipped, the use of the Ant tasks within the development kit will not be apparent.
Note - The Ant tasks are supported for use with the development kit, but their use outside the development kit is not supported, nor have they been thoroughly tested. |
1. Download and unzip Apache Ant in a separate directory.
If you don't already have Apache Ant version 1.6.2 installed on your system, you must download it from their web site at http://ant.apache.org. Unzip the package in a directory that is separate from the development kit.
2. Add Ant to your system path.
Add Ant's bin directory to your system path.
3. Unzip the Ant tasks bundle.
If you haven't already, unzip the Ant tasks bundle, which is included in the binary release. When you unzip the Ant tasks bundle, the Ant tasks' JAR file is extracted into the subdirectory java_card_kit-2_2_2/ant-tasks/lib. The documentation for the unsupported use of the Ant tasks outside the development kit is extracted into the subdirectory java_card_kit-2_2_2/ant-tasks/docs. For more information, see TABLE 2-1.
|
If you are planning to use the development kit to communicate with a PC/SC-compatible card reader, which is optional and unsupported, you need to perform the following steps.
1. Create the file jpcsclite.properties in any directory listed in the CLASSPATH.
2. Edit jpcsclite.properties so that it contains the line:
lib.path=<path_to_the_bin_directory_of_the_development_kit>
lib.path=/home/user/jcdevkit222/bin
TABLE 2-1 describes the files and directories that the binary installation procedure installs under java_card_kit-2_2_2.
Note - If you are using the Microsoft Windows platform, substitute the \ character for / in the paths. |
Contains release notes, the JAR file of Ant tasks that run the development kit, and the Ant Tasks User's Guide. The guide is provided in both PDF and HTML format. The Ant tasks' Javadoc tool files are in the ant-tasks/docs/html/javadocs subdirectory and a PDF compilation of those Javadoc tool files are in the ant-tasks/pdf subdirectory. The development kit will not operate properly unless Apache Ant and the Ant tasks are fully installed. However, use of the provided Ant tasks outside the development kit as described in the Ant Tasks User's Guide is not supported. |
|
Contains the export files for version 2.2.2 of the Java Card API packages. |
|
Contains all shell scripts or batch files for running the tools (such as the apdutool, capdump, converter and so forth), and the cref binary executable. Also contains a dynamic library for PC/SC support. |
|
The devnotes and guides subdirectories contain the English-language guides for this release:
|
|
Contains the three Java Card specifications in both PDF and HTML formats. |
|
Contains all Java programming language JAR files required for the tools:
|
|
Contains sample applets and demonstration programs. For more information on the contents of this directory, see Sample Programs and Demonstrations. |
All samples are contained in the samples directory under JC_HOME. TABLE 2-2 describes the contents of that directory.
Build script used to build demos. (Does not work without source bundle installation.) |
|
Contains the sources for the sample applets that belong to the packages com.sun.javacard.samples.*. |
|
Contains all of the files needed to run the Java Card platform demonstration programs. For more information on the contents of the demo directory, see Directories and Files in the demo Directory. |
|
Contains sample card acceptance device (CAD) client programs for the Photo Card, Java Card RMI, and secure Java Card RMI demos. |
|
Contains the Ant XML target that shows the user a help message related to building samples and demos. |
Copyright © 2005, Sun Microsystems, Inc. All Rights Reserved.