Java Card – Windows programming
Java Card – Windows programming
Java Card – Windows programming
Introduction :
The JavaCard appeared on the market for smart cards around 1996. They have the advantage of being able to develop applications using simple language, open and understandable by a large number of developers. They may be in the form of SIM card, bank card, access cards, etc. It sold close to one billion Java SIM cards per year worldwide. In 2009, over a billion Java SIM cards were in circulation in the world and more than 5.5 billion smart card JavaCard. This technology is compatible with existing smart card standards, allows you to run Java applications called applets on smart cards with low memory (a few tens of KB). Several applets can co-exist on the same JavaCard. The application Moneo, for example, is an application that coexists with the application Europay MasterCard Visa (EMV) on a credit card. You can familiarize yourself with the JavaCard a free development environment for developing applets, develop client applications and test them using a simulator card.
Specifications :
The JavaCard meet ISO7816 standard introduced in 1988. The latter describes (among others) the communication interface between the card and terminal. The reader provides the supply voltage and clock frequency of 3.5 MHz. The exchange of data is provided by a serial half-duplex flow between 9600 and 115200.
The APDU: Application Protocol Data Unit :
The exchange between card and terminal are using APDUs (sequence of bytes following the format defined in the standard ISO7816-4). CLA = byte class defined by ISO 7816 provides a number of control information (eg for maps 0xBC vital for SIM cards 0x0A, 0×00 for Mastercard / Visa)
Instruction byte INS =
P1 = 1 parameter
P2 = Parameter 2
Lc = data size (0×00 if no data)
= The maximum size of data to answer
The card responds by sending the response data (if any) followed by a status word coded on 2 bytes (named SW1 and SW2). Generally, SW1 indicates the type of response and SW2 provides additional information.
Re: Java Card – Windows programming
Identification applets :
Applets are identified by an AID (applet ID) composed of 5-16 bytes. The first five correspond to the ID of the application provider (RID) and the following identifies the application. The RID is provided by the ISO and DIN are reserved for development. To contact it, an applet must first be selected using the following APDU via the SELECT.
Limitations of the JavaCard Virtual Machine 2.x :
The framework JavaCard 2.x is a subset of Java. It only supports the following: primitive types boolean, byte, and short
the one-dimensional arrays
packages, classes, interfaces, exceptions
inheritance, virtual objects, overloading
object creation (new) but only in its constructor / method of installation (so no object creation in runtime)
Thus types long, double, float, char, String and multidimensional arrays are not allowed. The object creation (new) in runtime is technically possible but not recommended because Javacard has no garbage collector. In addition, the onboard memory is very low, there is no guarantee that there will be enough memory in runtime to create a new class instance.
To develop a JavaCard applet and a client application, we will install a development environment. The tools usually required are : Java Card Development Kit 2.2.2
development environment Eclipse version 3.2.2
Eclipse integration plugin version 0.1-JcDe
These tools require Java version 1.5 or higher.
0
Re: Java Card – Windows programming
Installation :
First, unzip the archive java_card_kit-2_2_2-windows.zip in the folder of your choice (C: JCDK in this tutorial). Unzip then four archives of the C: JCDK java_card_kit-2_2_2 into the same folder. This way you should see (among others) the following folders:
C:JCDKjava_card_kit-2_2_2bin:contains tools JCDK (simulator, …)
C:JCDKjava_card_kit-2_2_2lib:contains the libraries of JCDK
C:JCDKjava_card_kit-2_2_2jc_specificationsspecsapihtml:contains API JCDK (very useful)
To use the tools of JCDK command line, you must define two environment variables: JAVA_HOME contains the path to Java and JC_HOME containing the path to JCDK. It may then be useful to create a batch script to initialize these variables and update the PATH variable. For this tutorial, we create the script setvars.bat following:
Code:
@echo off set JAVA_HOME=c:java set JC_HOME=c:JCDKjava_c~1 set PATH=%PATH%;%JC_HOME%bin
Then install Eclipse: unzip the archive eclipse-SDK-3.2.2-win32.zip to a folder of your choice (C: Program Files Eclipse in this tutorial).
Install the plugin EclipseJCDE: Place the contents of the archive file plugins-eclipse-0.1.zip JcDe in the Eclipse plugins folder (C: Program Files eclipse plugins in this tutorial). At this stage, we have a development environment for creating JavaCard Applet, to simulate and create client applications.
Re: Java Card – Windows programming
Coding of a JavaCard applet :
We will create in this tutorial a basic applet. To do this, start Eclipse, from the File menu, then to New Other … :
Then select Java Card Project:
a
Then click the Next button. Then give the project a name. We call it “Tutorial JavaCard”
Then click on the Finish button. You should see the following error message:
Then enter the folder has been installed the Java Card Development Kit 2.2.2, then click the OK button:
At this stage, we just created our project JavaCard applet. We will now create our applet JavaCard. To do this, go to the File menu, then to New Other … Then select “Java Card Applet” then click the Next button:
http://install-how.blogspot.com/search?q=Guides
Article from articlesbase.com
Incoming search terms:
- java card tutorial
- java card tutorial pdf
- java card STK tutorial
- java card pdf
- java windows programming tutorial
- published articles registered authors in our article directory java
- javacard tutorial
- javacard tutoiral
- javacard VISA AID Mastercard
- JavaCardTutorial
Related posts:
- C Programming Language Family: Java, C++, Objective-C, Cyclone, Small-C, D, C Sharp, Openmp, Ecmascript, Const-Correctness, Go, Cilk, Cg, Glsl
- Of CGI & Java Scripts
- Windows Powershell Cookbook: for Windows, Exchange 2007, and MOM V3
- About CGI And Java Scripts
- download lots of actionscript, asp.net,C sharp,C++, visual C++, algorithm and data structure, bsd, java, css, html, javascript,php, mysql, xml, apache

Leave a Reply