The Java Card RMI Client framework requires stubs only when the remote_ref_with_class
format is used for passing remote references. These stubs of remote classes of applets must be pre-generated and available on the client. When the remote_ref_with_interfaces
format is used, stubs are not necessary.
In this example, the Java RMI Compiler (rmic
) is used to generate these stubs.
Following is the command to run the rmic
:
rmic -v1.2 -classpath
path -d
output_dir class_name
In the command:
path includes the path to the remote class of your sample applet and to the file tools.jar
output_dir is the directory in which to place the resulting stubs
class_name is the name of the remote class
The -v1.2
flag is required by the RMI client framework for the Java Card 3 platform
The rmic
must be called for each remote class in your applet.
Note:
You need to generate stubs only for remote classes that list a remote interface in their implements
clause.
The file tools.jar
, provided in the Java Card Development Kit contains compiled implementations of packages javacard.framework
, javacard.security,
javacardx.biometry, javacardx.external
and javacardx.framework.tlv
. Classes in these packages might be referenced by Java Card RMI applets and thus might be needed by the rmic
to generate stubs.