Cannot delete the applet

i'm working on JCOP in Eclipse and have a big problem now. normally i can install, select, and send command and finally delete applets. but the recent applet(performing class Cipher testing) i've installed, selected and run, but it can't be delete. attempting to delete always return error code 6985 and the applet stucks forever!! so i wanna know how can i delete such the applet? and can we replace the applet with a new one that has the same AID?
the trouble code is:
public static byte constructor01(){
          try{
               cip = new CipherTestClass();
          }catch(Exception e){
               return (byte)1;  // FAIL
          return (byte)0;  // PASS
     }the above code always return status word 6985 and the applet cannot be remove
but if i change to this one, the applet can be delete with "delete" command with status word 9000:
public static byte constructor01(){
          try{
               CipherTestClass cip = new CipherTestClass();
          }catch(Exception e){
               return (byte)1;  // FAIL
          return (byte)0;  // PASS
     }Both of the code have no error, can be installed, selected, and run, but only the second that can be remove from card.
thank you

Your first sample seems to store a reference to an object in a static field. You cannot delete an applet if a such a reference exists. (See Java Card specification!)
If you are using a GP211 card, you can delete the entire package using the following JCShell command:
delete -r <pkgaid>

Similar Messages

Maybe you are looking for

  • Security concern/ application concerns and procedures for zeroing all data

    Hi, I've looked through the posts and can't find the answers to my questions so here goes: I've had a MacBook Pro for about a year, and I may have to return it to my employer. In an effort to prepare the machine and make sure my information can't be

  • Module pool - table control - update ztable

    hello , i doing a module pool that will have few screens , now i have one screen with a table control that fetch the data from a ztable when screen is call the table control is showing the data and is in grey and no editable i add a pf-status for cha

  • Which is better, The iPhone 4 or iPhone 3GS?

    Hello people. I hope to be getting an iPhone today. I'm just trying to decide which one I will get. The 4 or 3GS? What are your opinions on both models? For some reason, I'd like to get the iPhone 4 because it's the latest model and the 3GS is almost

  • Activation date keeps slipping

    Hi, I am getting increasingly frustrated at the lack of information being given by BT in respect to FTTC. My exchange at Aberdeen Portlehen was meant to have been activated almost a year ago and I am still waiting. Whilst I appreciate there are techn

  • Won't finish the adobe download. Please help!

    I have been trying to download the Adobe flash player. It gets to 50% then it says an error has occured. I have tried ten times and still won't work. Any suggestions? I have the latest Apple software for my MacBook.