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 6883571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:23:58+00:00 2026-05-27T05:23:58+00:00

can some one tell me how to write data in smart card using java

  • 0

can some one tell me how to write data in smart card using java card?
i have this code
i am using java card 2.2

private void writeName(APDU apdu) throws ISOException
{ 
    apdu.setIncomingAndReceive();
    byte[] apduBuffer = apdu.getBuffer();

    byte j = (byte)apduBuffer[4];

    userName = new byte[j];
    for (byte i=0; i<j; i++)
    {
        userName[(byte)i] = (byte)apduBuffer[5+i];
    }
}
  • 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-05-27T05:23:59+00:00Added an answer on May 27, 2026 at 5:23 am

    If you are using JCOP plugin for developing the Applet, you can see .CAP files in the bin/ directory for each package. Now you will need to install each package in order of dependency. Suppose your application consists of packages A, B and C with your applet in C package. And B imports A and C imports B.

    The order in which you will need to install the packages are A,B,C. Using JCOP, this can be accomplished by:

    cm> install <pkgAID> package.cap
    

    Once you have done this for the three packages, you will need to install the applet. This can be accomplished by:

    cm> install -q <install params> <pkgAID> <AppletAID> packageC.cap
    

    Once you do this you will see the applet in SELECTABLE state. Your JCOP shell console would look like :

    Card Manager AID   :  A000000003000000
    Card Manager state :  SECURED
    
        Application:  SELECTABLE (--------) A00000008710015553
        Application:  SELECTABLE (--------) "2PAY.SYS.DDF01"
        Application:  SELECTABLE (--------) A0004D6946617265
        Application:  SELECTABLE (--------) A0000000041010  
    

    And all those packages that are “modules” (libraries) are shown like this:

        Load File  :      LOADED (--------) A0000002994E6F53
         Module    :                        A0000002994E6F53656C656374
        Load File  :      LOADED (--------) A0000002990410  
         Module    :                        A00000029904101045
    

    All those applets ini SELECTABLE state can now be selected and interacted with. If you want to send data to Applet with A00000008710015553, you will need to first select it. The interaction would be as shown below:

    cm>  /select A00000008710015553
     => 00 A4 04 00 09 A0 00 00 00 87 10 01 55 53 00       ............US.
     (5273 usec)
     <= 90 00                                              ..
    Status: No Error
    

    Now, you can send data to the above Applet by using send command:

    cm>  /send 00200000043131313100
     => 00 20 00 00 04 31 31 31 31 00                      . ...1111.
     (34423 usec)
     <= 90 00                                              ..
    Status: No Error
    

    These are all standard GP commands. I assumed that you are using a GP compliant card; you have mentioned nothing about it though.

    I personally feel you will need to read through a bit on how JC Runtime Environment and JC VM works and it’s relation with the API and a bit of GP spec before you delve into further.

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

Sidebar

Related Questions

Please can some one briefly tell me with example what does the means of
Can someone tell me how to change directories using FtpWebRequest? This seems like it
Can someone tell me what the code equivelant in VB.Net to this C# code
I have some SerialPort code that constantly needs to read data from a serial
hi friend can any one tell me that i have web server there i
hi friend can any one tell me that i have web server there i
I wish to write to a CSV file some data. One of the column
We have some code that looks like this: class Serializer { public: template<class Type>
Can someone tell me why I cannot write a class as follows <?php class
Can someone tell what is wrong with this query? sqltext = SELECT utyp, count(*)

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.