TheGoodUser
TheGoodUser

Reputation: 1198

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

enter image description here

Note :

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

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

Upvotes: 0

Views: 1108

Answers (1)

Maarten Bodewes
Maarten Bodewes

Reputation: 93968

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.

Upvotes: 3

Related Questions