smartcard - Using javacard Shareable class to share an interface between two applet as client and server with different package? -


i want share interface between 2 applets client , server different package aid. saw link: [0x6f00 error casting javacard shareable interface

in above link said: both client , server have in same package. have question now. possible client uses server functions if have different package aid? thank much.

client , server don't have in same package! both need depend on same package, contains shared interface.

in linked question, there problem interfaces: op declared 2 interfaces same name in 2 separate packages. why casting failed , 6f00 status thrown.


how use shareable interface:

1.declare shared interface public in server-side package:

package com.test.mypackage.a; public interface sharedobject extends shareable {         public void foo(); } 

2.use interface in client code:

package com.test.mypackage.b; import com.test.mypackage.a.sharedobject;  ... sharedobject obj = (sharedobject) jcsystem.getappletshareableinterfaceobject(svraid, (byte)0); 
  1. use server applet as library when building client applet.
  2. load server applet cap file first.
  3. then load client applet cap file.

Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -