Our Online Store have the new products: RFID antenna board. Currently it can work with JC10M24R and JCOP4 card chips.
Compared with normal cards, the antenna board module has a smaller size and fixed holes, which is easy to integrate in the IOT(Internet Of Things) project.

How to reduce the size of javacard applet

JavaCard Applet Development Related Questions and Answers.
mhsnmaghsoodloo
Posts: 24
Joined: Thu Apr 07, 2016 12:14 pm
Points :457
Contact:

How to reduce the size of javacard applet

Post by mhsnmaghsoodloo » Tue May 09, 2017 8:24 am

Hello everyone,
I wrote an applet which has 19 KB size on disk. It has three classes. The first one is extended from Applet, the second one has static functions and third one is a class that i create an instance from it in my applet.

I have three questions:
1- Is there any way to find out how much size has taken by my applet instance in my javacard?
2- is there any tool to reduce the size of a javacard applet (.cap file)?
3- Can you explain rules that help me to reduce my applet size?

Regards,
Mohsen.

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

Re: How to reduce the size of javacard applet

Post by UNKNwYSHSA » Tue May 09, 2017 10:40 pm

1 Write an applet to get card available memory size; You can get your applet size in card with following steps:
- Get card memory size size1;
- Load your applet to the card;
- Get card memory size size2;
- Your applet uses memory size: size1 - size2.
Note: The uses size are different for different card, because the different implementation of each card.
2 Remove the argument "-debug" of converter. The debug component in the CAP file will not be generated. This method can only reduce CAP file size, not applet size.
3 There are some rules i think of:
- Are there any common functions in your code? You can write them as common method;
- Are there any const data in your code? you can write it when you use it, not pre-defined in your applet;
sense and simplicity

mhsnmaghsoodloo
Posts: 24
Joined: Thu Apr 07, 2016 12:14 pm
Points :457
Contact:

Re: How to reduce the size of javacard applet

Post by mhsnmaghsoodloo » Sun May 14, 2017 6:43 am

Thank you very much, it was great answer.

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

Re: How to reduce the size of javacard applet

Post by UNKNwYSHSA » Sun May 14, 2017 9:45 pm

;)
sense and simplicity

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 50 guests

JavaCard OS : Disclaimer