Page 1 of 1

How to call call the process() method in another applet

Posted: Mon Mar 14, 2016 8:38 am
by Rasiand
Hello, I am newbie in java card field. I have tried to write an applet which need to call the process() method in another applet. How can I implement this? It would be better if you give me a sample code. Pls forgive me if my question is stupid.

Re: How to call call the process() method in another applet

Posted: Sat Mar 19, 2016 2:22 am
by gorgekin
See the sample code:
Target applet

Code: Select all

class TargetApplet {
  public static Applet INSTANCE;

  private TargetApplet() {
  }

  public static void install() {
    INSTANCE = new TargetApplet();
    INSTANCE.register();
  }
}


Client applet:

Code: Select all

TargetApplet.INSTANCE.process();