The Java Card™ technology allows applets written in the Java™ language to be executed on a smart card. It defines a Java Card™ Runtime Environment (JCRE) and provides classes and methods to help developers create applets. In addition, the 3GPP TS 43.019 standard provides classes and methods to create toolkit applets; that are applets triggered at a toolkit event.
The standards that are depicted in the picture below define all aspects of the development environment for STK (SIM Toolkit) applets. You should pay attention if you are developing on the SIM or the USIM (3G network) as the standards may be different. All specifications for the UICC (depicted in blue) are defined by ETSI and all the others (depicted in green and red) are maintained by 3GPP.
All the above depicted standards are available free of charge and can be retrieved from the 3GPP specification repository or from the ETSI Publication Download Area.
Quick overview of a toolkit applet architecture
A toolkit applet class must extend from the javacard.framework.Applet class. This class is the super class for all the applets residing on a Java Card™. It defines the common methods an applet must support in order to interact with the JCRE during its lifetime. The class Applet provides a framework for applet execution. Methods defined in this class are called by the JCRE when it receives APDU commands.
To be considered as a toolkit applet, a Java Card™ applet must implement:
- The ToolkitInterface interface to be able to process toolkit events described in the 3GPP TS 43.019 standard
- The ToolkitConstants interface to have access to constants specified in 3GPP 51.014 standard (for example: tags of the TLV/BerTLV, General results, etc.).
After the applet code has been properly loaded and linked with other packages on the card, the applet’s life starts when an applet instance is created and registered with the JCRE’s registry table. A toolkit applet must implement the static method install() to create an applet instance. It must also register the instance with the JCRE by invoking one of the two register() methods and register the toolkit events by invoking the ToolkitRegistry() method.
On the card, a toolkit applet is in an inactive stage until it is explicitly triggered via an event.
Once the applet is triggered, the SIM toolkit framework calls the applet’s processToolkit() method. This method processes the current toolkit event. If an error occurs, the throws() method of the ToolkitException interface specifies the reason of the exception. Finally, the applet returns in an inactive stage.
The 3GPP TS 43.019 API
These API classes are an extension of the Java Card 2.1.1 API classes. They allow application programmers accessing to the functions and data described in 3GPP TS 51.011 and 3GPP 51.014, such as the SIM based services can be quickly developed and loaded onto SIM cards. The APIs used by the card contain two packages:
- sim.access - this package provides the means to the applets for accessing to the GSM data and file system of the GSM application defined in the 3GPP TS 51.011 standard.
- sim.toolkit - this package provides the means for the toolkit applets to register to the events of the toolkit framework, to handle TLV information and to send proactive command according to the 3GPP TS 51.014 specification.


