Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8628305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:30:17+00:00 2026-06-12T08:30:17+00:00

edit 2: Found the mistake. I tried to initialize the Shareable object in the

  • 0

edit 2: Found the mistake. I tried to initialize the Shareable object in the constructor. At that time the client’s register method is not yet called, so the JCRE doesn’t have its AID. While my server’s getShareableInterfaceObject(AID clientaid, byte parameter) method doesn’t require the client’s AID to be != null the JCRE probably does, since it calls this method for my client. I now initialize my Shareable object when I process my first APDU and it now works.

And btw, thank you owlstead for helping with formatting of my post. Definitely made it easier to read!


I’m new to Java Card development and I can’t get my Shareable interface to work.

I have an interface class declaring a function my client applet wants to use. My server applet implements this class. My client applet looks up the AID and tries to acquire the interface by calling getAppletShareableInterface(). But this always returns null.

My server applet’s getShareableInterface() consists of just return this;, so I guess the fault lies elsewhere. But I have no idea where.

I’m using the JCWDE and stepping through the code I see that my server applet calls register so the client applet should be able to find it. Can anyone give me some pointers what could be going wrong?

edit:

public interface IF extends Shareable {
    public void method();
}

public class Server extends Applet implements IF {
    public getShareableInterfaceObject {
        return this;
    }
}

public class Client extends Applet {

    private Client() {
        AID ServerAID = JCSystem.lookupAID(byteArrayAID, (short)0, (byte)byteArrayAID.length);
        interface = (IF)JCSystem.getAppletShareableInterfaceObject(ServerAID, (byte)0x00);
    }

    public void process(APDU apdu) {
        interface.method();
    }
}

lookupAID returns the correct AID, but getAppletShareableInterfaceObject returns null as if the server applet didn’t exist.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:30:19+00:00Added an answer on June 12, 2026 at 8:30 am

    Found the mistake. I tried to initialize the Shareable object in the constructor. At that time the client’s register method is not yet called, so the JCRE doesn’t have its AID. While my server’s getShareableInterfaceObject(AID clientaid, byte parameter) method doesn’t require the client’s AID to be != null the JCRE probably does, since it calls this method for my client. I now initialize my Shareable object when I process my first APDU and it now works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT 9-3-10: I found this blog entry recently that was very enlightening. http://optimizermagic.blogspot.com/2007/12/outerjoins-in-oracle.html There
Edit #2: i disabled my 404 page and the default not found page says
FINAL EDIT: After following the answer from Darin Dimitrov, I have found that the
Edit: I fixed my mistake: I'm using a set and not a vector .
[edit] Found the solution. Reinstall EVERYTHING - xcode, mono, monodevelop and monotouch. Now it
EDIT : I found classloader leak in my webapplication. It boils down to 3rd
EDIT: I've found what's causing the issue, but I don't know why and I
EDIT 23-06-2012 10:24 (CET) : Found the answer Take a look at the bottom
EDIT: The entire code and database creation script can be found from http://gitorious.org/scheator .
I'm going to edit an ImageField using jquery ajax,after searching I found out I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.