Java Card Environment Tool
Java Card Environment Tool
Bouzefrane
Samia Bouzefrane
[email protected]
I. Development tools
I.1. Hardware
1. A Java Card platform (Java smart card).
2. A card reader.
I.2. Software
a) Download and install JDK 1.7 (use this link to download:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-
downloads-1637583.html ).
b) Download Eclipse IDE for Java Developers
(http://www.eclipse.org/downloads/ ).
c) Download the file JSR268TK.zip from:
(http://cedric.cnam.fr/~bouzefra/cours/cours_SEM/JSR268TK.zip ) and
store it in a local folder. This file is an eclipse project that includes some
tools used to install the application on the card.
d) Install if necessary the driver of the card reader. If you use Windows 7,
the card reader is detected automatically by the operating system. If you
use Windows XP for example, you need to install the driver from a CD or
Internet.
Click on “+” that is near General Click on Existing Projects into Workspace
Click on Finish
You must have this window. To show the packages of JSR268TK-2 project,
click on “+”.
In the following window, you have different parts of the project. It includes
some scripts (tools) necessary to install an applet and then to interact with it
from the terminal.
a) Configuration of ManagerConfig.xml
- The first step consists in modifying the file ManagerConfig.xml by inserting
the name of the card reader. For this purpose, you need to find the exact name of
the reader by accessing to the register base. We obtain it as in the following:
Start Button Execute Type: regedit
The name of the card reader is found in the following path:
Click on « + » behind Hkey local machine + software +
Microsoft + cryptography + calais + readers
Double-click on Device
declaration of constants
Methods: install() ,
select(), deselect().
Implementation of the
methods.
- Select Run As
- Click on Ant Build
If there is no error, a CAP file is generated from SampleTestApplet.java. It
remains only to load the file on the card and to run the client.
Declaration of constants
At this stage, check only if the compilation is correct because the execution will
generate errors since that the applet is not yet installed.
Each time the applet is modified, it needs recompilation and installation on the
card.