Quick Start Guide: Simulator API

jCardSim was originally developed for a fast prototyping of the Java Card applications, and writing unit-tests.

There are two ways to use the simulator:

Using of Simulator API

Using the javax.smartcardio for an interaction with JavaCard

In both cases it is possible to interact with a remote instance of jCardSim. For example you may run one or multiple instances of virtual Java Card and connect to it via TCP/IP.Using Simulator API's methods
The main interface for working with simulator is com.licel.jcardsim.io.JavaCardInterface, its specification available here. In order to get its implementation use com.licel.jcardsim.io.CAD.

Using javax.smartcardio for an interaction with JavaCard
For ease of writing Unit tests for an applications which use javax.smartcardio, we have the provider for Java Card Terminal's emulation in jCardSim.

Then, you can use javax.smartcardio API.Note: Pre-installed applets can be configured using system properties: System.setProperty(...), the format is equal with configuration file of the CLI mode of jCardSim.