Run the jcwde once and call many APDU scripts simultaneously?

Hello everybody.I currentrly try to develop an applet and I was wondering if it is possible to run the jcwde tool just once and call many apdu scripts(.scr files).

For example let says that you create an applet which has functions(INStrunctions) such as:

1)Verify Pin

2)Create a Record

3)Read a Record and e.tc...

In one window you ran the jcwde tool and you open let say 2 windows.In the first DOS-window you call the APDU script for the verifation of the PIN and in the second window you ran the APDU script which is responsible for creating a record.(but the jcwde is ran just once)

I will really appreciate any help and asistance.

Thanks.

[706 byte] By [kalogik1] at [2007-9-26 1:23:52]
# 1
I think Sun's way of allowing this to happen is for the developer to use the cref implementation. In there you can save your "card" and load it for additional commands.
DurangoVa at 2007-6-29 1:03:13 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 2
Have you looked at running multiple scripts on the apdutool command line ? apdutool <inputFile> [<inputFile>...]so it would look like this...apdutool installScript.txt verifyScript.txt
DurangoVa at 2007-6-29 1:03:13 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 3
I would like to thank for your assistance and guidance.You are right.You can call many APDU scripts and call just once the jcwde with the way that you wrote to me.Thank for your time.
kalogik1 at 2007-6-29 1:03:13 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 4

Hello again.I used to run multiple APDU script by using the apdutool and the jcwde once.

I tied today to run the multiple APDU scripts from the DOS but I had problem.The code of the APDU scripts are :

//Code of the createNew.scr

powerup;

//Select the installer-invoke the on-card installer

//CLA INS P1P2Lc |data fields==Lc-|

0x00 0xA4 0x04 0x00 0x09 0xa0 0x00 0x00 0x00 0x62 0x03 0x01 0x08 0x01 0x7F;

//create Newapplet-From the file jcwde.app(AID) Le=8..PINnumber=0102030405-Declare it here

0x80 0xB8 0x00 0x00 0x13 0x0a 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x9 0x1 0x07 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x7F;

//Select Newapplet

0x00 0xA4 0x04 0x00 0x0a 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x9 0x1 0x7F;

//powerdown;

And the code of the verify script is:

//powerup;

//Verify user's PIN input

//Cla INS P1P2Lc | PIN data from the demo1.scr APDU script--

0xB1 0x10 0x00 0x00 0x07 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x7F;

powerdown;

AS you can see the powerup command included only in the first file and the powerdown command in the second file.

I executed the files from the DOS command as following:

c:\>apdutool createNew.scr verify.scr

But it returns me the message:

com.sun.javacard.apdutool.ReaderWriterError: Lexical error at line 12, column 13

. Encountered <EOF> after "//powerdown;".

com.sun.javacard.apdutool.ReaderWriterError: Card powered down. (0x15)

The first file createNew.scr is executed properly and then it displays me the above message.

I also tried to run the multiple scripts with including the powerup and powerdown commands in the both files.No result.

Have you got idea what is going on?

Thank you.

kalogik1 at 2007-6-29 1:03:13 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 5
There is a bug with the apdutool. I've submitted a bug report with Sun a few weeks ago, Bug ID 4483782. But it's not tracked yetThe work around is to NOT execute a powerdown command at the end of script 1, and execute a powerup command in the second script.
DurangoVa at 2007-6-29 1:03:13 > top of Java-index,Java Mobility Forums,Consumer and Commerce...