Applets Development Guide
Moderator: product
-
product
- Posts: 106
- Joined: Wed May 20, 2015 2:04 am
- Points :658
-
Contact:
Post
by product » Fri Aug 21, 2015 3:44 am
This video shows how to create new project and debug javacard applet with
JCIDE.
Note: 1. Download the attachment to view this video.
2. Download the video from Google Drive.
You do not have the required permissions to view the files attached to this post. Please
login first.
-
javacardbr
- Posts: 22
- Joined: Mon Aug 10, 2015 9:38 am
- Points :104
- Location: BRAZIL
-
Contact:
Post
by javacardbr » Fri Aug 21, 2015 9:45 am
Very good! Thanks.
Waiting the next guide
![Smile :)](./images/smilies/icon_e_smile.gif)
Learning every day
![Wink ;)](./images/smilies/icon_e_wink.gif)
-
product
- Posts: 106
- Joined: Wed May 20, 2015 2:04 am
- Points :658
-
Contact:
Post
by product » Wed Aug 26, 2015 10:07 pm
The code used in this video as follows:
Code: Select all
package testApplet;
import javacard.framework.*;
public class testApplet extends Applet
{
public static void install(byte[] bArray, short bOffset, byte bLength)
{
new testApplet().register(bArray, (short) (bOffset + 1), bArray[bOffset]);
}
public void process(APDU apdu)
{
if (selectingApplet())
{
return;
}
byte[] buf = apdu.getBuffer();
apdu.setIncomingAndReceive();
short res = 0;
switch (buf[ISO7816.OFFSET_INS])
{
case (byte)0x01:
short tmp1 = buf[ISO7816.OFFSET_P1];
short tmp2 = buf[ISO7816.OFFSET_P2];
res = (short)(tmp1 + tmp2);
Util.setShort(buf, (short)0, res);
apdu.setOutgoingAndSend((short)0, (short)2);
break;
case (byte)0x02:
apdu.setOutgoingAndSend((short)0, (short)5);
break;
default:
ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
}
}
}
-
GraceGIRL
- Posts: 15
- Joined: Fri May 15, 2015 3:25 am
- Points :30
-
Contact:
Post
by GraceGIRL » Thu Sep 10, 2015 10:31 pm
Thank you for sharing this video.
![Smile :)](./images/smilies/icon_e_smile.gif)
Users browsing this forum: No registered users and 2 guests
JavaCard OS : Disclaimer
Board Disclaimer
The views and comments posted in these fora are personal and do not necessarily represent the those of the Management of JavaCard OS.
The Management of JavaCard OS does not, under any circumstances whatsoever, accept any responsibility for any advice, or recommentations, made by, or implied by, any member or guest vistor of JavaCard OS that results in any loss whatsoever in any manner to a member of JavaCard OS, or to any other person.
Furthermore, the Management of JavaCard OS is not, and cannot be, responsible for the content of any other Internet site(s) that have been linked to from JavaCard OS.