JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html

Got "6985" when loading applet into card

JavaCard Applet Development Related Questions and Answers.
shyjarod
Posts: 12
Joined: Wed Jul 29, 2015 1:45 am
Points :18
Contact:

Got "6985" when loading applet into card

Post by shyjarod » Fri Jan 22, 2016 5:16 am

I have written a simple applet.
Here is the code.

Code: Select all

package Test;
import javacardx.framework.util.*;
public class Test extends javacard.framework.Applet {

      private byte[] RAM = JCSystem.makeTransientByteArray((short)200, JCSystem.CLEAR_ON_DESELECT);
      private short[] arrayShort = JCSystem.makeTransientShortArray((short)100, JCSystem.CLEAR_ON_DESELECT);

private AppTest (byte bArray[], short bOffset, byte bLength)
{
       register();
}
public static void install(byte[] bArray, short bOffset, byte bLength) {
       new Test(bArray, (short)bOffset, bLength);
}
public void process(APDU apdu) {
 
       byte[] buf = apdu.getBuffer();
       short byteRead, rsltShort;
       boolean rsltBool;
       rsltShort = (short)0;
       byteRead = apdu.setIncomingAndReceive();
   
  switch (buf[ISO7816.OFFSET_INS]) {
 
       case (byte) 0xA4:
        if (selectingApplet())
         {
   
        }
        else
        {
         ISOException.throwIt(ISO7816.SW_FILE_NOT_FOUND);
        }
 
        break;
 
         case (byte)0xF4:
   
       if (buf[ISO7816.OFFSET_P1] == (byte)0x00)
        {
              UtilException.throwIt(UtilException.ILLEGAL_VALUE);
        }
       
   break;
   
  default:
   ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
  }
}
}


I can create the cap file successfully. But when I upload my applet into java card, it returned 0x6985.
I can not find the reason. Does anyone come across this problem? Please help!

User avatar
UNKNwYSHSA
Posts: 630
Joined: Thu May 21, 2015 4:05 am
Points :3055
Contact:

Re: Got "6985" when loading applet into card

Post by UNKNwYSHSA » Fri Jan 22, 2016 6:18 am

Which tool you used to load the cap to your card?
Show us load APDU commands and responses.
sense and simplicity

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 39 guests

JavaCard OS : Disclaimer