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

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 85 guests

JavaCard OS : Disclaimer