0

I've jsut finished coding my java Card Applet and I need to know how to upload the generated script file into the JavaCard so I can go further and start working on the client side to test my Applet. Thanks in advance.

Achraf
  • 67
  • 1
  • 6
  • Could you indicate the type of script that was generated, Achraf? There are many scripting utilities for Java Card. If possible - if the applet is not sensitive - please include (some of) the script. – Maarten Bodewes Mar 22 '14 at 00:21
  • Here is a part of my generated script : powerup; // Select the installer applet 0x00 0xA4 0x04 0x00 0x09 0xa0 0x00 0x00 0x00 0x62 0x03 0x01 0x08 0x01 0x7F; 0x80 0xB0 0x00 0x00 0x00 0x7F; // commons/javacard/Header.cap 0x80 0xB2 0x01 0x00 0x00 0x7F; 0x80 0xB4 0x01 0x00 0x17 0x01 0x00 0x14 0xDE 0xCA 0xFF 0xED 0x01 0x02 0x02 0x00 0x01 0x0A 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x00 0x7F; 0x80 0xBC 0x01 0x00 0x00 0x7F; – Achraf Mar 22 '14 at 19:04
  • Please try and edit code and scripts and such like in the question instead. It's much better readable that way, and it won't get lost after X comments have been generated. I've generated an answer from what you've provided, but note that with the given info, I can only generate an informed guess. – Maarten Bodewes Mar 22 '14 at 20:14

3 Answers3

0

I don't know about script files but for testing your Java code you can try this: https://github.com/martinpaljak/vJCRE#usage

Martin Paljak
  • 4,119
  • 18
  • 20
0

I have never heard of script file executed inside a JavaCard. Those scripts have to be executed on the host - they communicate with the card and perform commands on the JavaCard. Use the script environment you have implemented the script file for.

Robert
  • 39,162
  • 17
  • 99
  • 152
0

It looks like you've got a script for the Java Card simulator (as the AID in the first part shows Sun Microsystems - now Oracle - to be used for the card loader).

Your actual Java Card probably uses the Global Platform standard for loading applets. You need to send the contents of the .cap files after authentication to the GP Card Manager. There is a Global Platform implementation for Java available from Source Forge, and the standard is freely available (after registration).

Before uploading, please check if at least the mayor and minor version numbers of your Card implementation is correct. Be sure to compile against the correct version. Ask your vendor for the Java Card and GP version to use. A set of keys to authenticate to the card manager may be in order as well.

Maarten Bodewes
  • 90,524
  • 13
  • 150
  • 263