Java Card doesn't just require a compile stage, it also performs the linking that is usually performed as dynamic linking in the JVM of a normal Java application. Basically it orders the methods and such, and then calls the right serial ID. You don't want your Applet to contain the string names of your fields after all: it would explode the memory requirements, and dynamically looking for classes and fields is not a good idea either within such a restricted platform.
So if you call external libraries then you need to configure:
- the
.jar
file containing the .class files for the normal compiler;
- the
.exp
file which contains the an export of the mapping of the normal names and the ID of the classes and fields specific for the converted classes of the called library;
If it is not already present on the card, you may also need the version specific .cap
file for uploading. However, the GP functionality is should already be present on the card.
The ID's are only unique for a specific .cap
file / preloaded byte code. This is why you always need the right .exp
file for the code that is loaded. If another field is added, the ordering is different and the wrong fields would be linked, if the linker executes at all. So having the right .exp
file is a requirement for correct conversion to .cap
for your application / library.
For the JCDK I think you just need to configure the right -exportpath
, as the GP should be included with the JCDK.