Sharing an applet with another dosn't function

Hi all,
i have a problem that i share an applet with another, but it dosn't function:
i have two applet: epurse & bank   (bank is the master)
for that i creat a class "bankInterface" that's inherit from sharable:
package pack4;
import javacard.framework.APDU;
import javacard.framework.Shareable;
public interface bankInterface extends Shareable {
  public void debit(APDU apdu);
bank's declaration:
public class bank extends Applet implements bankInterface {
public Shareable getShareableInterfaceObject (AID clientAID, byte param){
  return ((bankInterface)this);  //or return this;
public  void deselect(){
      pin.reset();
  public boolean select() {
       return super.select();
  public static void install(byte bArray[], short bOffset, byte bLength) throws ISOException {
       new bank();
private bank() {
  register();
public void process(APDU apdu) throws ISOException {
public void debit(APDU apdu){
//empty juste for testing
}// end class 'bank'
epurse's declaration:
package pack4;
import ...
public class epurse extends Applet {
byte[] AIDServer=new byte[]{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x00, 0x00, 0x00};
public bankInterface sio;
private epurse() {
  sio=(bankInterface) JCSystem.getAppletShareableInterfaceObject(JCSystem.lookupAID(AIDServer, (short)0, (byte)AIDServer.length), (byte)0);
//methods: install, select, deselect
public void process(APDU apdu) throws ISOException {
byte[] apduBuffer=apdu.getBuffer()
if(apduBuffer[ISO7816.OFFSET_CLA] == (byte)0x80){
  switch(apduBuffer[ISO7816.OFFSET_INS]){
  case (byte)0x34:
  credit(apdu);break;
else{ ...}
}//end process
private void credit(APDU apdu){
apdu.setIncomingAndReceive();
sio.debit(apdu); // if this line is commented, i get the sw1:90 sw2: 00; else i get sw1: 6f sw2: 00 (wrong length)
}// end class epurse
i don't know where's the problem?

Hi,
If you go through the SIO concepts of JavaCard its mentioned that when "getAppletShareableInterfaceObject" is called from the client the JCRE will call "getShareableInterfaceObject" method of server with clientAID but where as you are requesting for SIO in install method before registration where the clientAID doesnt exists so the call will fail and return "null" and further references to SIO object will fail to perform expected operations.
So put request for SIO after registration of your client applet.
BR,
PPT

Similar Messages

  • If I restart an iPhone that is sharing a photostream with another account.. Will that account still have access to the stream?

    If I restart an iPhone that is sharing a photostream with another account.. Will that account still have access to the stream?

    Keep a backup from contacts (Address Book>File>Export>Address Book Archive) and Calendar (iCal>File>Export>iCal Archive) of your Mac and then press "replace".

  • Sharing address book with another account on same computer

    How do you simply share the Lion 10.7.1 address book with another user account on the same computer?

    miniman,
    I just double checked on my laptop that I share the music files with.
    When I did the steps from the above post, my music showed up just fine.
    The other account was blank as I didn't have any music in there anyway.
    All I had to do after the steps above was to "Add to Library" under the "File" menu. I then selected the entire "iTunes Music" folder in the shared library and added all the songs to it... Now you would not have to add all the songs if the other account didn't want them all.... So, you could be selective.
    Bottom Line.... It does work and then you only have one copy of the "iTunes Music" folder on the one hard drive... No duplicates....
    I did NOT have to have the box checked that said "Copy files to iTunes Music folder"..........

  • Sharing web updates with another Mac user

    Old Toad, I read your previous instructions from a couple of years ago about sharing the Domain folder with another user.  I found the Domain file, and uploaded it to DropBox and shared it with the domain owner.  He sees it in his dropbox but as separate files in the folder.  How do I instruct him now?  I can't even find the Library/Applications Support/iWeb file from where I got the domain file.  It doesn't turn up in FInder so how can I tell him where to go?  Any help gretefully appreciated.

    Where is he viewing the contents of the Dropbox?  If it's online then all he'll see are the contents of the domain package. If you use the deskltop Dropbox application on each machine to synce the domain file this is what you'll see in the local Dropbox folder: 
    Don't try to access the domina file online, just in the local Dropbox shared folder.
    In Lion and Mountain Lion the Home()/Library folder is now invisible. To make it permanently visible enter the following in the Terminal application window: chflags nohidden ~/Library and hit the Enter button - 10.7: Un-hide the User Library folder.
    To open your domain file in Lion or Mountain Lion or to switch between multiple domain files Cyclosaurus has provided us with the following script that you can make into an Applescript application with Script Editor. Open Script Editor, copy and paste the script below into Script Editor's window and save as an application.
    do shell script "/usr/bin/defaults write com.apple.iWeb iWebDefaultsDocumentPath -boolean no"delay 1
    tell application "iWeb" to activate
    You can download an already compiled version with this link: iWeb Switch Domain.
    Just launch the application, find and select the domain file in your Home/Library/Application Support/iWeb folder that you want to open and it will open with iWeb. It modifies the iWeb preference file each time it's launched so one can switch between domain files.
    WARNING: iWeb Switch Domain will overwrite an existing Domain.sites2 file if you select to create a new domain in the same folder.  So rename your domain files once they've been created to something other than the default name.
    OT

  • Sharing wireless connection with another powerbook g4...

    i've got airport expressed configured with my g4 and it works fine.
    however, my chum with another g4 clicks the name from the pull down window, enters the password (the one that Is the right one because it's in my keychain), and yet gets a wrong password error message.
    any clues why?
    thanks and happy holidays...

    What type of wireless encryption is the AirPort Express (AX) configured to use?
    What OS is his G4 running?
    Does his G4 have an original AirPort card or an AirPort Extreme card?

  • Sharing Itunes library with another User Account & Fast Switching

    Hi. I recently purchased a new iMac G5 and am in the process of setting it up to be used by 2 separate users (girlfriend and me). I apologize in advance if this is more of an Itunes issue and not solely an Administration issue.
    My question deals with creating a new user account on my Mac (with Fast Switching) and allowing my girlfriend to share my iTunes library with the ability to transfer music to her ipod when she is logged into her own unique account. I will be the Administrator on the Mac.
    We are trying to avoid loading our music two times into the Mac under each of our logins. Is there a way that we can share the music I have already loaded into my Itunes library when she is logged into her account so that she can transfer to her ipod and create her own distinct playlists? If so, any advice on how to enable this would be greatly appreciated.
    Thanks.
    Seth
    iMac G5   Mac OS X (10.4.3)  

    Unfortunately, baltwo's solution will not allow your girlfriend to create any playlists or copy songs to iPod.
    The easiest thing would be to share the entire music folder, so anyone of you can listen to your music.
    You'd have two options.
    If you want to be using the exact same library, so any playlist you created can be edited by your girlfriend and vice versa:
    1. Go to yourusername/Music/iTunes. You'll find two files called "iTunes library" and "iTunes music library" Copy them to your desktop, so you'll have a backup just in case.
    2. Move your yourusername/Music folder to computer/users/shared. (The folder will be copied ONLY in case your using FileVault, so you'd have to delete the original User/Music folder after making sure you'd got a functional copy at computer/users/shared) Select users/shared, press "apple+i" to get the info window, go to "Ownership" change all permissions to "read & write" and hit "apply to enclosed items"
    3. In case you're using FileVault, either delete or rename the original Music folder within your own account. Again, not necessary as long as FileVault isn't enabled.
    4. Select computer/users/shared/music, hold down "ctrl" while clicking on it and choose "create alias" from the contextual menu. Copy that alias into your homefolder as well as your girlfriend's account (need to log in) and rename it to "music" without the "alias" at the end.
    5. Launch iTunes. Done.
    6. Don't worry, in case you don't see your music. I've used a slightly different approach, yet this one should work totally fine.
    If you want to listen to the same music, yet be able to set up your own playlists, ratings etc.:
    For your account:
    - go to yourusername/Music/iTunes, move "iTunes Music" to computer/users/shared and change ownership according to #2.
    - If FileVault is enabled, check #3. Of course, you want to rename the original "iTunes Music" in this case.
    - create an alias for computer/users/shared/iTunes Music and copy the alias to yourusername/Music/iTunes. Rename it to "iTunes Music" without "alias".
    - Launch iTunes. Should be working the way it used to. Quit.
    For your girlfriend's account:
    - log in, copy alias to username/Music/iTunes, rename alias.
    - Launch iTunes, go to File-> Add to Library, select username/Music/iTunes/iTunes Music, choose.
    That's it.
    The only downside is, only one user at a time can access the music folder, so if you're logged in and running iTunes, you're girlfriend, logged in via fast user switching, won't be able to open iTunes until you quit it for yourself. Haven't found a way around this yet.
    Fell free to report any issues.
    huhh...rather long posting...

  • Sharing ITunes/IPhoto with another MAC?

    Have a Mac Pro on Snow Leopard and Mac Mini on Tiger. Also have a wireless Airport Extreme.
    Am I able to have one ITunes/IPhoto library and share with the other Mac without using a Network Media Center? Thinking about the Iomega Home Media Network Drive. If able, assume would be best to put everything on the Mac Pro since I have so much space than the Mac Mini.

    Zimmer1956 wrote:
    On my Mac Pro, have two accounts sharing the media files.
    The Mac Mini isn't set up to share - it is running Tiger, how do I set it up to share with the Mac Pro? Is there something I need to do to the Pro to allow it to share with the mac mini?
    I believe that the sharing declaration is done entirely in iTunes and iPhoto. It's easy to try. Launch iTunes, open its preferences window, select the "Sharing" pane, and select "Share my library on my local network". Then see if that Mac's music appears under the "Shared" heading in the iTunes sidebar on another Mac.

  • Sharing Aperture library with another user on the same mac

    Hi
    I just upgraded to Aperture 3.3, on a MBP running Lion (10.7.4) - I am trying to share the library with my wife so that each of us can retain our separate accounts and preferences and be able to edit/print/add pictures to the library
    I've seen some other posts, suggesting creating a separate directory outside of /Users which I've done: I've created /ApertureLib and moved the library there. I made sure I set permissions for owner, group and others to read/write/execute
    When i try opening the library through my wife's account it tells me that "the library is being used by (null), you must first quit (null) to use this library"
    I added sticky bits, tried to set ACLs, no dice...
    any suggestions?
    Thanks!
    PS: all of the image files are actually stored on a NAS box and mounted via AFP. I tried moving the Aperture library to the NAS box but the performance was atrocious. so I kept the library on Macintosh HD and just reference the picture files from the NAS share.

    PS: all of the image files are actually stored on a NAS box and mounted via AFP. I tried moving the Aperture library to the NAS box but the performance was atrocious. so I kept the library on Macintosh HD and just reference the picture files from the NAS share.
    That is the safest solution. The Aperture library should reside on a local volume, MacOS X extended formatted. Your NAS probably is neither local nor formatted MacOS X extended, see
    Aperture: Use locally mounted Mac OS X Extended volumes for your Aperture library
    I am trying to share the library with my wife so that each of us can retain our separate accounts and preferences and be able to edit/print/add pictures to the library
    Aperture is a single User program. Only one of you can use Aperture at a time. So you hvae to quit Aperture in your account, before your wife can launch it from her account. Also make sure that iPhoto is not using the library.
    One big problem with sharing a Library are permissions and ownerships. When you make changes to an Aperture Library and add images, you are the owner of the added images. The safest way to share a library therefore would be to put it on an external volume or onto a separate partition of your hard drive. Then you can set the "Ignore ownership on this volume" flag and share the data with out permission problems. To set this flag on a volume, select it in the Finder and use "File > Get info" from the Finder's main menu bar (or press cmd-I).
    Regards
    Léonie

  • Sharing iphoto library with another person?

    Hi
    I have a photo library on my iPad first generation.
    Can I transfer this entire library to another person's MacBook for them to have?
    Would I do this via iTunes or iPhoto 11?
    I don't want to wipe out their library.
    AS

    No, I'm sorry I don't. It works properly on my machine. Perhaps you have problems with the operating system. You could try the following:
    Repairing the Hard Drive and Permissions
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger.) After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer. Now shutdown the computer for a couple of minutes and then restart normally.
    If DU reports errors it cannot fix, then you will need Disk Warrior (4.0 for Tiger) and/or TechTool Pro (4.5.2 for Tiger) to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.

  • Question about sharing itunes library with another mac acct user

    I have set up my itunes library to be accessible from an external HD and have it set up to where a second acct user on my mac can access it. My goal is to be able to sync my wife's and my iphone to the same itunes library/playlists, since we share that music.  I followed the instructions to set this up and can see the original library showing up in the itunes acct of the second user. What I dont understand is haw to sync my playlists to the second accounts user's iphone? When I connect and pull up itunes, and select to sync specific playlists, it only gives me the option to select new playlists created on her accounts, not the ones I am sharing with the second account? All of the songs are showing up in her library as well as my visible shared library. Is this how it should work...in other words, it I add a new song to my library, it will also show up in the second accounts library, along with the one that is visible as my shared library. Does the second account just need to make their own playlists, vs being able to select specific ones on my account to sync?

    I have set up my itunes library to be accessible from an external HD and have it set up to where a second acct user on my mac can access it. My goal is to be able to sync my wife's and my iphone to the same itunes library/playlists, since we share that music.  I followed the instructions to set this up and can see the original library showing up in the itunes acct of the second user. What I dont understand is haw to sync my playlists to the second accounts user's iphone? When I connect and pull up itunes, and select to sync specific playlists, it only gives me the option to select new playlists created on her accounts, not the ones I am sharing with the second account? All of the songs are showing up in her library as well as my visible shared library. Is this how it should work...in other words, it I add a new song to my library, it will also show up in the second accounts library, along with the one that is visible as my shared library. Does the second account just need to make their own playlists, vs being able to select specific ones on my account to sync?

  • Sharing iweb page with another person on a diff computer and that has iweb

    I am working on an official website for a composer in iweb. he has iweb too. he would like me to send him just one page to modify and such in iweb on his computer. how do i go about doing this.
    Chris
    Message was edited by: MacAVUser08
    Message was edited by: MacAVUser08

    To expand on Wyodor's suggestion of iWebSites you can try this:
    1 - duplicate your domain file with the site in it.
    2 - open the duplicate and delete all the pages but the first page. Rename the two domain files to: FullSite.site2 and FirstPage.site2.
    3 - send the FirstPage.site2 domain file to the composer. I imaging you could zip that file and email it to him as it shouldn't be too large. If you have any movies or large files added to that page it may be too large to email.
    4 - the composer can open and edit that page to his specifications.
    5 - the composer sends that edited page back to you.
    6 - put the edited FirstPage.site2 file into your your Home/Library/Application Support/iWeb folder along with the FullSite.site2 file.
    7 - use iWebSites to merge those two domain files into a new 3rd domain file.
    8 - open the new merged domain file and move the edited first page into the full site, replacing the current first page.
    Another method would be to follow this MacWorld online article: Managing an iWeb site from multiple Macs .
    There are some warnings that you must be aware of and they are described in the article and in the related, linked article/tutorial.
    OT

  • Sharing an iMovie with another Mac user

    I am a new Mac user.
    I am taping my nephew's football games for his coach.  I imported the video into iMovie and created the project.  Now, I am struggling to figure out the best way to share the project with the coach.  I had anticipated putting in onto a flash drive, but I keep getting a message saying that the 5.65 GB movie is "too large for ovum's format."  I am trying to use an 8GB flash drive.  Help!!

    Where is he viewing the contents of the Dropbox?  If it's online then all he'll see are the contents of the domain package. If you use the deskltop Dropbox application on each machine to synce the domain file this is what you'll see in the local Dropbox folder: 
    Don't try to access the domina file online, just in the local Dropbox shared folder.
    In Lion and Mountain Lion the Home()/Library folder is now invisible. To make it permanently visible enter the following in the Terminal application window: chflags nohidden ~/Library and hit the Enter button - 10.7: Un-hide the User Library folder.
    To open your domain file in Lion or Mountain Lion or to switch between multiple domain files Cyclosaurus has provided us with the following script that you can make into an Applescript application with Script Editor. Open Script Editor, copy and paste the script below into Script Editor's window and save as an application.
    do shell script "/usr/bin/defaults write com.apple.iWeb iWebDefaultsDocumentPath -boolean no"delay 1
    tell application "iWeb" to activate
    You can download an already compiled version with this link: iWeb Switch Domain.
    Just launch the application, find and select the domain file in your Home/Library/Application Support/iWeb folder that you want to open and it will open with iWeb. It modifies the iWeb preference file each time it's launched so one can switch between domain files.
    WARNING: iWeb Switch Domain will overwrite an existing Domain.sites2 file if you select to create a new domain in the same folder.  So rename your domain files once they've been created to something other than the default name.
    OT

  • Sharing the process with another host

    Dear all,
    I am a newbie to this forum and this is my first post.
    Please excuse me if I have posted in a wrong area.
    My query is :
    I have a unix server where we have a oracle 10.2.02 database installed.
    These days the unix serve is overloaded and we know that its due to this db as the number of people using this oracle database has shoot up to a very large number(ie from 100 to 900, we kept on increasing the max proceses as and when the processes reached maximum). Now I happen to hear about the sharing the load of a database between unix servers.
    Please help me understand this better. What I want here is to share some of the database processes with the any other server/servers so that this unix server is saved from crashing. Please provide some documents with which I can implement this.
    Thanks in anticipation,
    NEWBIE:)

    Hi buddy,
    I am a newbie to this forum and this is my first post.
    Please excuse me if I have posted in a wrong area.We are always learning something, We are all newbies. ;)
    I have a unix server where we have a oracle 10.2.02 database installed.
    These days the unix serve is overloaded and we know that its due to this db as the number of people using this >oracle database has shoot up to a very large number(ie from 100 to 900, we kept on increasing the max proceses >as and when the processes reached maximum). Now I happen to hear about the sharing the load of a database between unix servers.The processes reached maximum, it's not a problem, You can increase it and adjusting the OS kernel parameters. But the most important thing is identifing what has caused it. Is quantity of users increased? IS Your system has hung and the users started to opening more then one session?
    Please help me understand this better. What I want here is to share some of the database processes with the any other server/servers so that this unix server is saved from crashing. Please provide some documents with which I can implement this.If Your system has any kind of problem, RAC won't correct it at all. But You can use RAC to scaleout Your system. Creating a cluster database and dividing the load across all servers of Your cluster.
    Hope it helps,
    Cerreia

  • Sharing internet connection with another mac

    I have a 2.33 GHz Intel Core Duo iMac with 2 GB memory running Leopard 10.5.1 and connect to the internet through a cable modem into my ethernet port. I have internet sharing and Airport on. My daughter has an iMac G4 running 10.3.9 and gets her internet connection through my computer through an Airport connection. This was working well until I upgraded to Leopard and now she is unable to connect. Either my computer does not show up on her list of available networks or it will show up only briefly. When it does show and she tries to connect, she gets an error message stating there is a problem connecting. Never happened before he Leopard upgrade. Any ideas?

    Thanks again both...
    I think I have done exactly as you suggest. The USB modem is in the MBA USB port and connects to the mobile signal giving a good, fast connection - allowing my MBA to use safari and mail very well and with good download speeds. I go in to system preferences, internet and network, sharing and internet sharing in the "share connection from" I choose ZTEUSBModem. In the "to computers using" I tick Airport. In airport options I've tried 40 and 128 bit WEP. The ipad sees a wireless network and connects using the password I set in the internet sharing, airport options section. However, if you try to look at a web page, it just sits there for a bit but doesn't work. I tried my Iphone 4 last night and got the same result. Both work fine with my usual home wifi network, just can't get them to play nice with this USB mobile broadband modem....
    Thanks again for trying to help..

  • Sharing itunes music with another computer

    I have another Mac OS 10.2.8 that I use at school. I am unable to use music from my home computer (10.2.8 also) on that computer. I keep getting the message to download version 7 of itunes. However it will not download on 10.2.8. I am supposed to be able to use this music on 2 computers. I know there is a way to still download music on itunes because I do it on my home computer. How is that done? I've forgotten.

    Any music that you downloaded from iTunes can only be played by your user account that you log in with in iTunes. I don't understand what you mean by use music from home on that coomputer, but if you mean play stuff that you downloaded from iTunes you have to be logged in as the same person with all permissions to be able to play it.

Maybe you are looking for