[Muscle] Re: Problem generating Muscle Card Applet 0.9.11

sferey s.ferey at wanadoo.fr
Sun Mar 2 08:16:20 PST 2008


Amanda Ortega a écrit :
> I tried to load my package under control of the security domain 
> A000000003000000, but this error is showed:
>
> >GPShell.exe cardEdgeInstall.
> select -AID A000000003000000
> --> 00A4040008A000000003000000
> <-- 6A82
> select_application() returns 0x80216A82 (6A82: The application to be 
> selected could not be found.)
this is very unexpected ! the card domain shall be present ... or it 
isn't a GP card

try to select it with "old" (OP 2.0.1) AID: ie A0000000030000 (7 bytes long)
or with partial AID (it the card supports it), try A000000003 only.

> Sorry, but I didn't understand how to convert my classes with *2.1* 
> export files, could you explain more step by step, please?
may be it is also useful to explain the goal...
when you compile Java source, you obtain class files (yes obvious thing).
these class describe their content and dependency with indicator stored 
in the constants pool.
that pool contains descriptors in form of package / class name (eg 
"java.lang.String"), method identifier.

these string (chain of characters) identifiers are not easy to manage 
for a JavaCard VM, so they are converted to numerical identifiers, one 
int16 value for the package, one for the class and so on.
here come the exports file: they contain the numerical identifiers to be 
used instead of the literal ones.
and prior to be able to load a class in card you have to convert the 
class files (or a JAR) into a CAP file thank to these export files.

how you do this depends of your dev. tools; it could be a SUN provided 
tool, or a proprietary (card provider) one.
since you do have a CAP file (that currently fails to load) you had 
generate it, check your build process (script, ...) to find out where it 
is generated.
at this point simply change the parameter of this converter to use the 
2.1 export files; you will basically replace the current path that 
points to 2.2.x EXP files to your new path containing the 2.1 EXP files; 
of course you have first download a 2.1 JVC-SDK from SUN, and simply 
store the EXP files somewhere relevant; do not change anything else to 
your JVC environment, you can keep the currently used API, stub (if 
any), ..., simply use the EXP files in your "class2cap" conversion.

Sylvain.






More information about the Muscle mailing list