Skip to content

Building

Philip Wendland edited this page Jul 31, 2016 · 2 revisions

This page describes the build process of IsoApplet.

Requirements

The following requirements must be fulfilled in order to be able to compile and build the binary.

Java Card SDK

You have to use version 2.2.2 or above which can be found at oracle.com. Follow the installation instructions carefully. Most importantly, the environment variable JC_HOME must be properly set.

Apache ant

Apache ant is used as the build tool for this project.

Build process

Note that following instructions are based on Linux operating systems. It should, however, work on Windows as well (and quite similarly).

The IsoApplet uses ant-javacard to build cap-files. After cloning the IsoApplet repository:

git clone https://github.com/philipWendland/IsoApplet.git

All you have to do is:

  • Perform git submodule init && git submodule update to retrieve the ant-javacard source code. (Tip: A simple git clone --recursive will clone the repository including all submodules!)
  • Download a suitable Java Card SDK (e.g. version 2.2.2).
  • For ant-javacard to recognize the Java Card SDK you can either set the JC_HOME environment variable, modify the javacard task in the build.xml (<javacard jckit="/path/to/jckit">), or set jc.home. See the ant-javacard documentation for more details.
  • Assuming you have Apache ant installed on your system, you can now just invoke ant to produce the cap file. This will also compile ant-javacard when invoked for the first time.

The IsoApplet.cap file will be located at the root directory of the project. This is the file to upload to your smartcard.

To clean the working directory again, invoke ant clean.

Earlier versions

Earlier versions of the IsoApplet used the Java Card ant tasks. If you want to build the cap file with the old build.xml file, you have to

  • set the JC_HOME environment variable to the Java Card SDK and
  • make the Java Card ant tasks known to ant (e.g. by compying $JC_HOME/ant-tasks/lib/jctasks.jar to $ANT_HOME/lib).

You can then build the applet by invoking ant as well.


Finally, you can proceed with the installation of the applet.