Question about running RMIDemo

Hello everyone.

I tried running the RMIDemo by converting my own CAP files and generating the script files for loading into the script.

My question is, must the Generated RMI STUB which i generate using rmic command be converted together with the CAP files?

The problem now is that when i run the RMIDemo in the CREF simulator, it gives me a

java.rmi.RemoteException: Applet selection failed sw = 6d00.

It works fine in the JCWDE simulator though.

Does the problem lie in the rmi stub file or something else?

Can someone help me pls? been stuck at this for hours.... thanks in advance.

[635 byte] By [30centsa] at [2007-11-27 11:48:13]
# 1

The RMI STUB file must NOT converted! There are only for the client application.

That means that the stub file must be visible to the client application.

In addition i think that you are not able to convert stub files

Now for the applet selection, I can't understand why you have that response, but I will try to guess:

After the conversion, you must add before RMIDemo.scr the Header.scr

and after the Footer.scr.

You will find them into JC_HOME\samples\src\demo\misc, try to make them txt to view the content.

ALSO you must add a line between RMIDemo.scr and Footer.scr, to create the applet like:

// create RMIDemo

0x80 0xB8 0x00 0x00 0x0c 0x0a 0xa0 0x00 0x00 0x00 0x62 0x03 0x01 0xc 0x5 0x01

The general patern is:

0x80 0xB8 0x00 0x00 0x0c (AID Bytes) 0x00 0x7F; (If i remember well)

try it and tell me if you need more help.

Friendly, Bill ;)

vcalmalioa at 2007-7-29 18:17:42 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 2

Thanks so much Bill! you really released me from my fustrations.

The problem was indeed with the creation of the applet. Because before testing using jcrmi, i was testing using script files directly using the APDUTOOL and in doing so, the creation of applets was always done on the script file itself.

Hence, when using jcrmi this time round, the java code itself does no creation of the applet. So the installing script file must contain the creation of applet command.

Thanks once again =)

30centsa at 2007-7-29 18:17:42 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 3

I understand you, I have been desperate too... If you want to learn more I recommend you to download the

java card specifications available in sun's site. The Java Card Development Kit doesn't contain them.

Also I remember n older post from you about the PIN and you asked from where the default pin set to 12345 and I was thinking about it.

I finally understand from a script inside jcdk, that it is relevant with create command.

Just see:

Wallet AID = 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x6 0x1

// create wallet applet

0x80 0xB8 0x00 0x00 0x14 0x0a 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x6 0x1 0x08 0 0 0x05 0x01 0x02 0x03 0x04 0x05 0x7F;

vcalmalioa at 2007-7-29 18:17:42 > top of Java-index,Java Mobility Forums,Consumer and Commerce...