How do I load an applet using Open Platform?

Julien SIMON

First, you need to send the CAP file to the card. Whatever toolkit you use, it should include a tool that builds a load script from the CAP file. In other words, this tool chops the CAP file and writes a script composed of an INSTALL LOAD command, followed by as many LOAD commands as needed to send the CAP file.

Once the CAP file has been loaded, you have to instantiate the applet using the INSTALL INSTALL command. This will trigger a call to the applet’s install() method, which must call the applet constructor and register the applet with the JCRE.

The final step is to make the applet selectable using the INSTALL MAKE SELECTABLE command. You don’t have to run this command immediately, but only when you actually want the applet to be selectable.

Note that these last two steps may be condensed into one, in which case the applet is instantiated and immediately made selectable.

About | Sitemap | Contact