This discussion is archived
7 Replies Latest reply: Jan 18, 2013 6:13 AM by fgrieu RSS

How can an applet's instance call a method in another instance's context?

fgrieu Newbie
Currently Being Moderated
Consider a Java Card Classic applet with multiple instances that need to share some data in a byte[] variable (e.g. persistent mutable, that is EEPROM/Flash), containing information common to all instances.

A static byte[] variable would be a perfect fit, but these happen to be prohibited by validation rules imposed on me (I'm told: as a catch-all way to demonstrate that un-instantiating an instance frees what it allocated on instantiation).

This would be solved if a slave instance could call one of the applet's method in the context of a master instance (perhaps initially identified by AID, or/and/then in some other way). How can this be done? Any example?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points