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.

Code sharing between applets

JavaCard Applet Development Related Questions and Answers.
ordane
Posts: 11
Joined: Thu Dec 17, 2015 11:02 pm
Points :57
Contact:

Code sharing between applets

Post by ordane » Tue Feb 23, 2016 3:52 am

I am looking for ways on how to share custom libraries between applets. Does anyone know how to write source code in order to include common custom classes in different applets? Thanks for any answer!
Note: I am not looking for interface sharing between applets.

User avatar
mabel
Posts: 237
Joined: Mon May 18, 2015 3:09 am
Points :1705
Contact:

Re: Code sharing between applets

Post by mabel » Thu Feb 25, 2016 11:47 pm

Let me give you a clear thinking:

- Create new Class, but don't extend Applet, let it called Library Class.
- Generate jar, exp and cap of this library class.

Case example:
- You can have 2 applet, for example Applet A & B.
- Applet A can use the API (common code/method) from the Library Class by importing the jar file of Library Class.
- Generate cap file of Applet A by including exp file of the Library Class.
- Applet B can use the API (common code/method) from the Library Class by importing the jar file of Library Class.
- Generate cap file of Applet B by including exp file of Library Class.

By doing this scheme, the Library Class shall be loaded first before you load and install Applet A & B.

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 104 guests

JavaCard OS : Disclaimer