Test Card Guide

The Java tools with versions and download links, building and installing step by step, testing on a terminal, and troubleshooting.

Test cards only: made-up card numbers and test keys. Never put live card data or live keys on a test card.

From the website to a card in a terminal

  1. Install the Java tools, once per PC.
  2. Build and install with the kit: a menu does it all.
  3. Or by hand: the javac, converter and gp.jar commands.
  4. Test the card at a terminal.
  5. When something goes wrong.

You need a supported JCOP card (J3R180, J3R150, J2A040), a contact PC/SC reader and a Windows 10 or 11 PC. The card data and the applets come from Card Data and Applet.

1. Install the Java tools, once per PC

ToolNeeded forTested versionWhat to pick
Eclipse Temurin JDK 8
Compiles the applets and runs the Java Card converter.
Build 8u504-b01 Windows x64, the .msi installer (or the .zip). It must be JDK 8: newer JDKs produce class files the converter refuses.
Eclipse Temurin JRE 21 (or any Java 11+)
Runs gp.jar, which needs Java 11 or later.
Install, List, Remove, Wipe 21.0.12.1 Windows x64, the .msi installer (or the .zip). It sits beside JDK 8 without conflict.
GlobalPlatformPro gp.jar
Talks to the card's security domain: load, install, list, delete.
Install, List, Remove, Wipe v25.10.20 (v24.10.15 also works) Download gp.jar from the latest release and keep it next to the kit, in Downloads, or in a folder you name in card.env.
Oracle Java Card Classic Development Kit 3.0.5u4
The Java Card 3.0.5 API and converter, for JCOP 4 cards.
Build for J3R150, J3R180 3.0.5u4 In the 3.0.x section. Oracle asks you to accept its licence, and may ask you to sign in.
Oracle Java Card Development Kit 2.2.2
The Java Card 2.2.2 API and converter, for the J2A040.
Build for J2A040 2.2.2 On the Java ME archive page, under Java Card. Oracle asks you to accept its licence, and may ask you to sign in.
  • The JDK must be 8: newer JDKs make class files the Java Card converter refuses. JDK 8 and Java 21 sit side by side without conflict.
  • The Java Card 2.2.2 download has its bin and lib folders inside a second zip, java_card_kit-2_2_2-rr-bin-windows-do.zip: unzip it where it is.
  • A PC that only installs cards someone else built needs just Java 11+ and gp.jar.

These tools come from their publishers, under their own licences; the site does not redistribute them. Versions checked on 2026-10-25.

2. Build and install with the kit

  1. Download the kit on the Kit page: pick your chip, and the cards ticked on the Applet page go in it.
  2. Unzip it (right-click, Extract all). It does not run from inside the zip, needs no administrator rights and installs nothing.
  3. Double-click START.cmd. Windows may ask whether to run a file from the internet: choose Run. A menu opens:
     KABC Test Card Kit - 3 cards for JCOP 4 (J3R180)
     ------------------------------------------------
      1  Check my setup          Java tools, reader, card
      2  Build the CAP files     javac and the Java Card converter
      3  Install on the card     replaces our applets if already there
      4  List the card           what is installed, and free memory
      5  Remove our applets      only the ones this kit installed
      6  Wipe the card           everything except the security domain
      0  Exit
  4. 1 Check my setup finds the Java tools, the reader and the card, and says how to fix what is missing. What it finds is saved in card.env.
  5. 2 Build, then 3 Install. Each step ends in a green Done or a red Stopped with what to do; the full output is in logs\.

Before installing, look at card.env. Its card key is the well-known default test key; if your card uses another, put it there. The website never asks for it.

# Your card and reader. This file stays on your PC.
chip=j3r180
reader=                 # part of the reader's name; empty = the only contact reader
key=404142434445464748494A4B4C4D4E4F   # the default test key
#key-enc=  key-mac=  key-dek=          # or three separate keys

# Your Java tools: found by Check my setup, or set here.
jdk8=
java=
gp-jar=
jc-kit=

3. Or by hand

What the kit runs, written out for a Command Prompt opened in the unzipped projects download. Repeat it for each project, including the PSE and the PPSE; the shared library is loaded once per card.

J3R180: NXP JCOP 4 (P71), newer mask, Java Card 3.0.5 Classic. Converter com.sun.javacard.converter.Main, javac -source 1.7, API api_classic.jar, and -Djc.home.

TestCardInteracDebit (A0000002771010)TestCardPse (315041592E5359532E4444463031)TestCardPpse (325041592E5359532E4444463031)

Build

Command Prompt
rem Your tools: change these two lines to the folders on your PC
set "JDK8=C:\Program Files\Eclipse Adoptium\jdk-8.0.504.1-hotspot"
set "JC=C:\Program Files (x86)\Oracle\Java Card Development Kit 3.0.5u4"

rem Where this build goes (run the commands from the unzipped download)
set "OUT=%TEMP%\tc-build\TestCardInteracDebit"
rmdir /s /q "%OUT%" 2>nul & mkdir "%OUT%"

rem 1. Compile the shared library and the applet together, for Java Card 3.0.5 Classic (class files for Java 1.7)
"%JDK8%\bin\javac" -source 1.7 -target 1.7 -encoding UTF-8 -nowarn -Xlint:-options -cp "%JC%\lib\api_classic.jar" -d "%OUT%" lib\EmvCommonLib\src\com\testcard\emv\common\*.java projects\TestCardInteracDebit\src\com\testcard\emv\interacdebit\*.java

rem 2. Convert the library first: the applet links against its export file
"%JDK8%\bin\java" "-Djc.home=%JC%" -cp "%JC%\lib\api_classic.jar;%JC%\lib\*" com.sun.javacard.converter.Main -classdir "%OUT%" -d "%OUT%" -exportpath "%JC%\api_export_files" -out CAP EXP JCA com.testcard.emv.common 0xA0:0x00:0x00:0x02:0x03:0x02:0x00 1.0

rem 3. Convert the applet
"%JDK8%\bin\java" "-Djc.home=%JC%" -cp "%JC%\lib\api_classic.jar;%JC%\lib\*" com.sun.javacard.converter.Main -classdir "%OUT%" -d "%OUT%" -exportpath "%JC%\api_export_files;%OUT%" -applet 0xA0:0x00:0x00:0x02:0x77:0x10:0x10 com.testcard.emv.interacdebit.InteracDebitApplet -out CAP EXP JCA com.testcard.emv.interacdebit 0xA0:0x00:0x00:0x02:0x77:0x10:0x10:0x00 1.0

rem The CAP files:
rem   %OUT%\com\testcard\emv\common\javacard\common.cap
rem   %OUT%\com\testcard\emv\interacdebit\javacard\interacdebit.cap

Install

Command Prompt, the same window
rem Java 11 or later runs gp.jar (not JDK 8). Change these lines to your files.
set "JAVA=C:\Program Files\Eclipse Adoptium\jre-21.0.12.1-hotspot\bin\java.exe"
set "GP=%USERPROFILE%\Downloads\gp.jar"
rem The card's key. This is the well-known default test key: use your card's own if it differs.
set KEY=404142434445464748494A4B4C4D4E4F

rem 1. See what is on the card (and that the key is right)
"%JAVA%" -jar "%GP%" --key %KEY% --list
rem    "Failed to open secure channel" or "Card cryptogram invalid": STOP. Fix the key first:
rem    every failed try counts down the card's lock counter, and at zero the card is locked for good.

rem 2. Load the shared library, once per card (skip it when the list shows A0000002030200)
"%JAVA%" -jar "%GP%" --key %KEY% --load "%OUT%\com\testcard\emv\common\javacard\common.cap"

rem 3. Remove an older copy of this applet (an error here on a fresh card is fine)
"%JAVA%" -jar "%GP%" --key %KEY% --delete A000000277101000 --force

rem 4. Load and install the applet
"%JAVA%" -jar "%GP%" --key %KEY% --install "%OUT%\com\testcard\emv\interacdebit\javacard\interacdebit.cap"
"%JAVA%" -jar "%GP%" --key %KEY% --list

Install deletes the old package with --force, which also removes its applet instance. The library stays: deleting it would remove every applet that links against it. To start again from an empty card, use the kit's Wipe, which keeps the security domain.

4. Test the card at a terminal

  1. Load the CA key. terminal-ca-keys.txt, in the kit and in the projects download, has each CA public key your cards use: RID, index, modulus, exponent and checksum. Load it into the test terminal's CA key table. Without it, offline data authentication fails.
  2. Run a purchase with the card in the contact slot, then tapped if your chip and reader are contactless. The PSE answers on contact and the PPSE on contactless.
  3. Read the result. The terminal's receipt or log shows the TVR and the cryptogram. For a trace, the Trace Analyzer checks it rule by rule; the EMV Simulator runs the same flow step by step.

The card's PIN is in its profile (step 1 of Card Data). The cryptograms use the issuer master keys of step 2, so a test host with the same keys can check the ARQC and send an ARPC.

When something goes wrong

You seeMeaningDo
Failed to open secure channel / Card cryptogram invalidThe card keys are wrong.Stop. Fix key in card.env. Each try counts down the card's lock counter, and at zero the card is locked for good.
6985 when deletingThe package has an applet instance and the cascade was not asked for.The kit always passes --force; add it to your own commands.
6985 when loadingThe package is already on the card (usually the shared library).List the card: nothing is wrong if it is there.
SCardTransmit … 0x1fNo answer over this interface.Use a contact reader: applets cannot be loaded over contactless.
invalid AID (converter)The AID is not in the 0xA0:0x00:… form.The kit and the commands above write it that way.
Class file version / unsupported major.minor (converter)Compiled by a JDK newer than 8, or without the right -source.Point jdk8 in card.env at a JDK 8.
UnsupportedClassVersionError (gp.jar)gp.jar is running on Java 8.Set java in card.env to Java 11 or later; keep jdk8 on JDK 8.
Unrecognized option: --enable-native-accessAn older Java was given a Java 22+ option.The kit adds it only for Java 22+; check java in card.env.
6A80 on load or installgp.jar is too new for this card's GlobalPlatform version.Try gp.jar v24.10.15.
6A82 on SELECTThe AID is not on the card, or the PSE/PPSE was selected over the other interface.List the card; check the interface.
Terminal: offline data authentication failedThe terminal lacks the CA key, or holds another under the same RID and index.Load terminal-ca-keys.txt; change the CA index (step 3 of Card Data) if it clashes.
Terminal: application not foundNo directory, or the terminal does not support this AID.Keep the PSE and PPSE on the Applet page; check the terminal's AID list.
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.