简体   繁体   中英

Convert to .cap error- invalid AID 1.0 in Eclipse

This is the source code that I want to upload to my card :

import javacard.framework.APDU;
import javacard.framework.Applet;
import javacard.framework.ISOException;


public class ReadMemo extends Applet {
    private ReadMemo() {
    }
    public static void install(byte bArray[], short bOffset, byte bLength)
            throws ISOException {
        new ReadMemo().register();
    }

    public void process(APDU arg0) throws ISOException {
        // TODO Auto-generated method stub
    }
}

As you see, the program do nothing! but why when I want to convert it to .cap file, I receive this error : invalid AID 1.0

在此处输入图片说明

Note :

my package ID : 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07

my applet ID : 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x08

Move your code out of the default package ( never use the default package in Java). Because the package_name argument is empty, the arguments have been shifted to the left, and it will now see the version number as an AID. Hence the strange error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM