JCShell Tutorial - Upload & Install

To interact with your applet, it must be uploaded onto the card or simulation.
The "Upload" is a 2-step process. The first step is uploading the cap-file and the second step is the installation of the applet uploaded.

The upload is only possible if the same AID's does not exist on the card.
To be sure, delete the applet and package before starting the upload. Use the Card Manager Plugin "delete" command to delete a component.
Usage: delete <AID>   (for more info see: delete command description)

Upload the applet

Use the Card Manager Plugin "upload" command to load a cap-file.

Usage: upload -b 250 <cap_file_name>   (for more info see: upload command description)

After uploading, the applet is on the card (visible) but not installed (selectable).

Example:

cm>  upload -b 250 "C:\Projects\test\sampleRmiApplet\bin\com\ibm\test\rmi\javacard\rmi.cap"
Status: No Error
Load report:
  377 bytes loaded in 1.5 seconds
  effective code size on card:
      + package AID       8
      + applet AIDs       21
      + classes           73
      + methods           75
      + statics           0
      + exports           8
     ------------------------------
        overall           185  bytes

cm>  card-info
Status: No Error

Card Manager AID   :  A000000003000000
Card Manager state :  OP_READY

    Load File  :      LOADED (--------) A0000000035350   (Security Domain)
     Module    :                        A000000003535041
    Load File  :      LOADED (--------) "TEST.RMI"
     Module    :                        "TEST.RMI.APP01"
		

Install the applet

Use the Card Manager Plugin "install" command to install a uploaded cap-file content.

Usage: install -i <instance_AID> -q C9#() <package_AID> <applet_AID>   (for more info see the install command description)

After installation, the applet is on the card (visible) and installed (selectable).

Example:

cm>  install -i 544553542e524d492e4150503031  -q C9#() 544553542e524d49 544553542e524d492e4150503031
Status: No Error

cm>  card-info
Status: No Error

Card Manager AID   :  A000000003000000
Card Manager state :  OP_READY

    Application:  SELECTABLE (--------) "TEST.RMI.APP01"
    Load File  :      LOADED (--------) A0000000035350   (Security Domain)
     Module    :                        A000000003535041
    Load File  :      LOADED (--------) "TEST.RMI"
     Module    :                        "TEST.RMI.APP01"