How to set up the JavaCard SDK on Ubuntu 10.10:

I compiled these instructions for those of you having trouble using the JavaCard SDK on Ubuntu 10.10.  First you need to install some tools:
  • Install ant:
    Install ant by using apt-get:

    sudo apt-get install ant
  • Install java-1.5.0-sun:
    There are many way to install the sun-java development kits. I did it by enabling the partner repository. Edit the sources.list file,

     sudo vim /etc/apt/sources.list 

    and uncomment the two  lines corresponding to the “partner” repositories. Then run

    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install sun-java5-jdk

    To switch between the java versions use:

    sudo update-java-alternatives -l
    sudo update-java-alternatives -s java-1.5.0-sun

    Where the “-l” option will show you which versions are currently installed. The “-s” options will let you chose the version you want to use as default.To use the Java Card SDK, you also have to set the JAVA_HOME variable, which is in my case:

    export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun

    You may want to add it to your “~/.bashrc” file to make this setting persistent.

  • Download and Setup the JavaCard SDK: I downloaded the Java Card Development Kit 2.2.2 from the official website. It came as a .zip file which I extracted in “~/javacard”. One of the extracted folders (~/javacard/java_card_kit-2_2_2) contains more .zip files which have to be extracted.It is a good Idea to download the documentation and the API as well. It can be found on the official website.Once you extracted all the .zip files, you should read the Java Card User Guide located in “~/javacard/java_card_kit-2_2_2/doc/en/guides/html/index.html”
    Once again you will have to set up some environment variables, in my case:

    export JC_HOME=$HOME/javacard/java_card_kit-2_2_2
    export PATH=$PATH:$JC_HOME/bin

    Tha Java Card Development Kit contains a few binaries located in the “$JC_HOME/bin” folder. When I unzipped them, the execution permission was not set. To fix it apply the following to all binaries in the bin folder:

    chmod a+x $JC_HOME/bin/converter

    If everything works, you should be able to build the samples:

    sh $JC_HOME/samples/build_samples
  • Test installation: Now that everything is installed, you should be able to run the sample demonstrations. Just follow the steps in the JavaCard User Guide mentioned above.
Tagged with →  
Share →

One Response to JavaCard Development – Ubuntu 10.10

  1. Iphone 5 says:

    Acquiring examine this I assumed it had been quite educational. I value you taking enough time and hard work to place this informative article with each other. I when yet again locate myself shelling out strategy to considerably time each studying and commenting. But so what, it had been nevertheless worthwhile!

Leave a Reply

Your email address will not be published. Required fields are marked *