Java card ISO 7816 file system

Hello
Java Card technology dose`t provide core APIs for ISO file system.Is there any mechanism for creating DF and EF on java cards.If there is,please guide me.Is there any sample code for this subject at sun.com?I want to creat DF and some EF on a java card and then manage them.How I can do it?Please guide me.
Best
[email protected]

JavaCard doesn't contain a file system. It's been repeated in this forum over and over. How many times does this have to be answered ? Have you searched to forum prior to asking ?
For JavaCard there isn't a need for a filesystem because of the power of having a language on the card. Also byte arrays with a TagLengthVariable (TLV) do the job just fine.

Similar Messages

  • How to create a java card library (jar file to be used in other programs)

    Hi all,
    I am working on JCOP and writing quite a bit of applets for the java card . Now i have lots of code that could be reusable for example sending SMS, encryption routine, etc.. So this part of the code i want to put into a utility class and create a package out of it. This utility package i must be able to import into my programs what i write.
    I tried the normal way of creating the jar by renaming the CAP file of the utility class, also tried including the /javacard/* files also into the jar file as indicated by sfarmer(active forum member here). But none seems to work. I tried contacting NXP folks and they indicated that it may be possible only by way of Sharable Objects.
    But some how i am not convinced why i should use Sharable object for this. So if any one can throw some light into this regard it will be immensely helpful to me and my project.
    Regards
    Prakash

    Hi,
    Well the variable defined are as below
    public static byte[] msgdata = new byte[255];
    private static final byte[] HEADER_TEMPLATE = {
              (byte) 0x81, (byte) 0x03, (byte) 0x01, (byte) 0x21, (byte) 0x00, // Command details tag
                   (byte) 0x82, (byte) 0x02, (byte) 0x81, (byte) 0x02, // Device Identities tag
                   (byte) 0x8D, // Text String tag
                   (byte) 0x00, // length
                   (byte) 0x04, // Text String tag
    the msgdata is declared public so that i can access this as a Class member in my other program doing Utilities.msgdata. But the problem is now that if i dont declare it as final then the compiler gives me the below error
    "library has initialized array for non-final, non-static field Utilities, msgdata, [B, attr jc-field: tok 0, public static"
    If i make it final then i cannot change it... So now i am stuck..
    Any help will be highly appreciated...
    Regards
    Prakash                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Java card - Unsupported class file format

    Friends,
    when im converting my class file to CAP file, im getting the message that "unsupported class file format of version 49.0". Can any one please help me out.
    Thank you,
    Harshavardhan

    but in the pre Requisites of Installing, its mentioned that "The supported SDK version is 1.4.1. ". and im using 1.5.0. So i need to use only 1.4.1 or earliar versions?

  • Java Card and heath care system

    I am in the process of developing a health care system an I want to find out if there any that uses javacard. if so please give me a link.

    thanx for your reply and the article is well appreciated, but is there any technical article on the issue. Is there any that would show some of the components involved in building such a system?

  • A question about design of Java Application on java card.

    Hi every one,
    I have a question about design of Java applet on java card,
    There is an application on my card that it is not java card, it include a DF and some EF under DF, I would like to know if I want to have this application on java card ,how can I design DF and EF on java card ,I mean is there any relation between DF,EF with applet and file? for example can I say DF is same as applet and EF is same as file?
    I'll appreciate for any help .
    yours sincerely,
    orchid

    hi
    you can write a java class for DF.
    an instance of DF class have some EF objects.
    for example,
    samples/com/sun/javacard/samples/JavaPurse/CyclicFile.java
    implements ISO 7816 CyclicFile ( EF )
    see also:
    http://forum.java.sun.com/thread.jspa?threadID=673745&messageID=3936272
    best regards,
    siavash

  • Java card implementation

    I am a beginner of java card.
    I want to implement JCRE on a smart card.But I don't know what I must do,what components can I get from SUN?

    I am not just wanting to write a applet,I am planning to implement a JCRE on a card.
    I(not only one) have used Infineon's smart card chip to develop COS(Chip Operating System).Now,I am planning to implement a JCRE on a Infineon card,but I don not know whether I can do like this.In my opinion implementation of Java card is a software system for programmers.if the smart card chip have enough resource,programmers can implement JCRE,manufacturer of chip(for example Infineon company) will mask your code into ROM just like code of COS.Could you tell me how to apply for a license from SUN or oher things about java card implementation?
    Thanks a bunch,durangova.

  • Java Card & X 509 certificates

    Hi,
    i have a question about using Java Card with X.509 Certificates (including Attribute Certificates RFC 3281).
    I already have some experience with JC 2.1.1. I have implemented applets for storing files and retrieving them (deployed on card using GemXplore Developer Kit)
    and then managed the communication between off card application using the OCF 1.2.
    But that was back in 2004. From what i see now OCF has been abandoned.
    What i want to implement now is to load Certificates on Java Card (and store files as well).
    I read that in order to manage Certificates, i have to use a PKCS 11 API (like Bouncy Castle or IAKI). Does this substitute OCF? I remember OCF was complimentary to PKCS 11.
    And if it does, can i use such API to read and write other files except from Certificates? Finally does it treat Attribute Certificates (AC) same as PKI Certs?
    I case you need clarifications, i ll be happy to provide. Thank you in advance
    John

    I think you can store keys and data to sign in the same applet. data is just data, it won't auto interfere.
    about javacard 3, I think this is a very polemic subject. To feed the troll, I'll say that I'm working in a smart card company that has done cards for many years. since the beginning, i can say. All my colleagues and I think that javacard 3 is an evil. APDUs ARE card-ish and a good thing for such small CPUs. Javacard 3 has been made by sun under pressure of telcos that don't want complicated things, and are big specification fans, that never wrote a line of code. Javacard 3 will put a big overhead on card response time: as of now, there are many abstractions levels to cross to execute bytecode, and servlets and (dont know what will replace apdus) will increase transaction times.
    cards are cards, not web servers. for us, public transportaton sectors guys, javacard 3 is a frankenstein. we want speed and low level access. we don't care about J2EE.
    just don't tell me about the increased mem and power of new cards. How much will they cost? A javacard is already expensive, they will not get cheaper, and this will not help spreading javacards.
    people working in the J2EE world will code for javacard 3 like they do for mainframes. They will require more powerful card just because they're too lazy to code a correct embedded software . Can you imagine that? Maybe javacard 4 will require a heatsink on cards.
    this is a very personal opinion of course ;)

  • Java Card File System ...Please reply

    Hi all ,
    I am working on Java Card technology for last one year . Presently I am facing some problem regarding some file concept of java card .
    I know that Java Card 2.1 does not support file system . But I want to simulate the file system in java card using applets . i.e . I want to write an application(applet) , which can simulate the EF , DF in smart card . Whenever APDU command is send to the file system applet , it should generate a Elementary file (EF) or dedicated file (DF) etc and store data to that file.
    Can I do this type of thing using Java Card ? I am really in doubt .
    If you have any idea on this , please let me know your view on this . If you know any open source code for this type of simulated Java card file system , please let me know .
    I am desperately looking for a help .
    regards
    Dibyendu .
    you can contact me to this email
    [email protected]

    dear duran ,
    You have written that
    "Follow the guidelines for the different supported filesystems on the JC"
    But after Java Card version 2.0 , it does not support file system . I am using Java Card 2.1 .
    Could please some sample code to my mail Id , so that I can take a look at it .
    My mail id is : [email protected]
    Please share the idea , as I am really need some help.
    Regards ,
    Dibyendu.

  • How to design a file system based on java card

    I have reviewed all kinds of articles about it.And right now I can not find any source code to do that function.But how to design a full gsm file system using java card.
    of course you need fast access,dynamic allocate memory,file properties management.Let's talk about it.

    just do it.
    there is no such feature in the javacard api. This must be coded by hand, you have to manage memory, etc.
    I know, that's not cool.

  • What about ISO/IEC-7816 file structure, Is this concept is not in jcard.

    Hello all,
    I read out ISO/IEC 7816-4 and it tell about MF , DF, EF files which are used in smart card, i am using java card.
    I am reading java card but i did not read about these file structure,
    according to iso/iec-7816-4 , A4 is a INS for SELECT FILE command. In scosta if i want to save name in smart card then i do
    *1*- create MF
    *2*-create Df ( INS- E0)
    *3*- create ef with record oriented structure(INS-E0)
    *4* run write record command (*INS-D2*)
    and now i can read this name whenever i want by using read record command.
    I only want to know that if i want to record several names in java card (in java card eeprom ) then which line i need to write inside the PROCESS () method of applet.
    -----------how i permanent save in smart card memory?
    -----------how i read the data from perticular location or the location where name exist?
    Thanks in advance..............
    Edited by: rohit pathak on Feb 9, 2012 10:41 PM
    Edited by: rohit pathak on Feb 9, 2012 10:42 PM

    if (selectingApplet())
                   return;
    // this method  is use to make a difference between select applet
    //apdu { have to call it before any apdu pass to card, this apdu is isolate to process method }
    //and other apdu { here class and INS is for your choice,
    // it depends how u implement it in process().amazing Umer, atleast for me really it's gr8 to have you here..
    you know i am a beginner so it is sure that there would be a no. of question in my mind now!!!!!and I want to share with you for your answer as well try to get it by my own, u already help me a lot , and i would
    be always thankful for this. I am posting some questions here, if you feel it is genuine question , pls reply and if
    you think i am bothering you to ask such a foolish question , u dont!!!!
    QUESTION -1
    As I know about architecture of any application is -
                    //normal java software                          java card                                  java card
                      //  1                                               2                                      3
    1-            application program                        host application                           host application
    2-                     JVM                                   Applets                                       Applets
    3-              operating system                JCRE(which contain all classes, JVM ....)                 JCRE(act as a O.S too)
    4                    hardware                              Operating system                                 H/W
    5                                                                        hardwareWhat do u think- case 2 is right? or 3 is!!!!!!!!!!!
    I think - case 3 is right!!!!
    As i study from several sources , JCRE is complete package - it behaves as a operation system and use the functionality of component it contain. I also think if i will purchase a java card from any vendor , it would have JCRE inside it (means everthing inside it,), i only need to develop the applet according to my requirement and install it by on card installer program
    QUESTION 2- what is the advantage of java card.?
    // I think.
    as i read out , i got the line that it is platform independent and support multiple application. applicaton point of
    view , I am agree but how it is platfrom independent. if we use java card for smart card development, then
    i will purchase Java card from differnt vendor , all will provide me card with supported jcre inside it, so why
    this is advantage here?
    // in case of window based application , it really make sense  because if i will make any window application with java
    // i can run it in windows , linux , unix and most of os flavours, here i can see the beauty of java language.
    Clear me this and add some other java card advantages, which make java card goodquestion 3-
    Now I am capaple to make simple applets, so I want to check the entire java card process atleast once before
    going in deep of something, I am thinking to implement prepaid card concept , i made it applet for it ,it will
    contain a page with 2 text box ( 1- for recharge 2- for money deduction ) and two button , with button click i
    want to select the applet and want to pass the apdu.
    ( a) how i can make host window application ? (i think awt will work for me? , *
    i never make any java window application yet) *
    ( b) still i dont have any java card , i want to make it by using simulator, is it possible?
      (c) in this scenario what framework i need to study Ex. Import javacard.framework.* for making
    applet or from where i need to start.regards:
    rohit pathak
    Edited by: rohit pathak on Feb 9, 2012 10:39 PM

  • OCF file system cards

    Hi
    where do i get smart cards which support OCF, here i am not pointing to java cards, i would like to know if there are smart cards(file system cards) which support java.
    Regards
    M.R.Rajaram

    OCF supports cards that support ISO 7816. (Filesystem & JavaCards). Go to opencard.org and download. If you intend on using it on WIndows, go to Gemplus and get the OCF patch. Otherwise you'll get errors like 0x54 that don't exist !
    You also might want to check out JPCSC. It will run on multiple platforms, and much better. Also it's open sourced and a bit supported.
    Good luck

  • File system cards

    Hi everybody
    Noob question.Can I using Java Card Development Kit 2.2.1 with Integrated Circuit Memory Cards,which have no processor on the card and I think not JavaCard.
    Thanks.

    OCF supports cards that support ISO 7816. (Filesystem & JavaCards). Go to opencard.org and download. If you intend on using it on WIndows, go to Gemplus and get the OCF patch. Otherwise you'll get errors like 0x54 that don't exist !
    You also might want to check out JPCSC. It will run on multiple platforms, and much better. Also it's open sourced and a bit supported.
    Good luck

  • How to Install .CAP file in the Java Card?

    Hi Friends..
    How to install *.CAP* file in the Java Card?..
    I've GPShell script as follows :
    mode_211
    enable_trace
    establish_context
    card_connect -readerNumber 2
    open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f
    install_for_load -pkgAID a00000006203010c01 -nvCodeLimit 500  -sdAID A000000003000000
    load -file HelloWorld.cap
    card_disconnect
    release_contextwith that script i can load HelloWorld.cap file successfully..
    Now, how to install the HelloWorld.cap file?..
    if i add script : load -file HelloWorld.cap i got this error :
    install -file HelloWorld.cap
    file name HelloWorld.cap
    Command --> 80E602001B09A00000006203010C0107A00000015100000006EF04C60201A80000
    Wrapped command --> 84E602002309A00000006203010C0107A00000015100000006EF04C60201
    A80030C859793049B85300
    Response <-- 6985
    install_for_load() returns 0x80206985 (6985: Command not allowed - Conditions of
    use not satisfied.)i ask this question because when i tried to select the applet through its AID, by this script :
    establish_context
    card_connect -readerNumber 2
    select -AID a00000006203010c0101i got this message error : select_application() returns 0x80216A82 (6A82: The application to be selected could not be found.)
    but there's exactly any that AID in my Java Card..
    here's is the list of AID from My Java Card :
    C:\GPShell-1.4.2>GPShell listgp211.txt
    mode_211
    enable_trace
    establish_context
    card_connect -readerNumber 3
    * reader name OMNIKEY CardMan 5x21-CL 0
    select -AID a000000003000000
    Command --> 00A4040008A000000003000000
    Wrapped command --> 00A4040008A000000003000000
    Response <-- 6F108408A000000003000000A5049F6501FF9000
    open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4
    f -enc_key 404142434445464748494a4b4c4d4e4f // Open secure channel
    Command --> 80CA006600
    Wrapped command --> 80CA006600
    Response <-- 664C734A06072A864886FC6B01600C060A2A864886FC6B02020101630906072A864
    886FC6B03640B06092A864886FC6B040215650B06092B8510864864020102660C060A2B060104012
    A026E01029000
    Command --> 8050000008AAF7A87C6013BC0300
    Wrapped command --> 8050000008AAF7A87C6013BC0300
    Response <-- 0000715457173C2A8FC1FF0200937A55C288805D8F2A04CCD43FA7E69000
    Command --> 848201001023CA18742D36165ED992CFF2146C3D51
    Wrapped command --> 848201001023CA18742D36165ED992CFF2146C3D51
    Response <-- 9000
    get_status -element 10
    Command --> 80F21000024F0000
    Wrapped command --> 84F210000A4F004FF8BE1492F7275400
    Response <-- 0CF0544C00004D4F44554C415201000009A00000006203010C010100010AA000000
    06203010C01019000
    GP211_get_status() returned 2 items
    List of Ex. Load File (AID state Ex. Module AIDs)
    f0544c00004d4f44554c4152        1
    a00000006203010c01      1
            a00000006203010c0101
    card_disconnect
    release_contextPlease help me..
    And please correct me if i'm wrong,,
    Thanks in advance..

    Any suggestions for my question?..
    Please help me..
    Thanks in advance..

  • Java.lang.Error: java.util.zip.ZipException: The system cannot find the fil

    I got maven 221 installed
    i got jdk 1.6 and 1.5 installed (have tested both)
    I have a strange error. All my co-workers can build but I cant. The only thing I can find is that I dont have installed BEA Weblogic but I dont want to have that installed. It should be able to run anyway.
    Could someone tell me what is wrong? If you need pom.xml I got that one as well.
    process-classes:
    [copy] Copying 4 files to C:\hudson\jobs\albpm_ip-identity-asserter_-_Build\workspace\target\mbean-content
    [mkdir] Created dir: C:\hudson\jobs\albpm_ip-identity-asserter_-_Build\workspace\target\mbean-jar
    [java] Creating an MJF from the contents of directory C:\hudson\jobs\albpm_ip-identity-asserter_-_Build\workspace\target\mbean-content...
    [java] Compiling the files...
    [java] Creating the list.
    [java] Doing the compile.
    [java] WLMaker-SubProcess: : Exception in thread "main" java.lang.Error: java.util.zip.ZipException: The system cannot find the file specified
    [java] WLMaker-SubProcess: :      at weblogic.management.commo.BeanGenDriver.getManagementTempDir(BeanGenDriver.java:93)
    [java] WLMaker-SubProcess: :      at weblogic.management.commo.BeanGenDriver.main(BeanGenDriver.java:117)
    [java] WLMaker-SubProcess: : Caused by: java.util.zip.ZipException: The system cannot find the file specified
    [java] WLMaker-SubProcess: :      at java.util.zip.ZipFile.open(Native Method)
    [java] WLMaker-SubProcess: :      at java.util.zip.ZipFile.<init>(ZipFile.java:203)
    [java] WLMaker-SubProcess: :      at java.util.jar.JarFile.<init>(JarFile.java:132)
    [java] WLMaker-SubProcess: :      at java.util.jar.JarFile.<init>(JarFile.java:97)
    [java] WLMaker-SubProcess: :      at weblogic.management.commo.BeanGenDriver.getManagementTempDir(BeanGenDriver.java:90)
    [java] WLMaker-SubProcess: :      ... 1 more
    [java] WLMaker-SubProcess: : Stopped draining WLMaker-SubProcess:
    [java] WLMaker-SubProcess: : Stopped draining WLMaker-SubProcess:
    [java] BeanGen code generation failed
    [HUDSON] Archiving C:\hudson\jobs\albpm_ip-identity-asserter_-Build\workspace\pom.xml to C:\hudson\jobs\albpmip-identity-asserter_-Build\modules\dk.skat.ip.integration.albpm$ip-identity-asserter\builds\2010-11-2213-41-28\archive\dk.skat.ip.integration.albpm\ip-identity-asserter\1.2\pom.xml
    [INFO] ------------------------------------------------------------------------

    from my experience, using weblogic jars can be a pain if the full install is not on the local box.
    Note that you dont have to 'install' it. Just copy the directory.
    Reason is that the jar files have manifests with relative classpaths.
    For an example of horror take a look at the weblogic.jar MANIFEST's classpath entry.
    -Fred

  • The version number of export file in Java Card 2.2 is not correct

    Hi all,
    I used jdk1.3.1 and java card 2.2's exp2text tool to see the content of an export file. The value of minor_version is 1. But the JCVM 2.2 spec. says it should be 2. So which one is correct?
    Joey

    Read my post again....indicate binary compatibility or incompatibility between successive implementations of a package.
    I can gerenate CAP files generated with JC 2.2., and load onto my JC 2.1.1 cards. AS LONG as I'm not using JC 2.2 implementation.
    Run the exp2Text on javacard.framework.service and notice that it should read minor = 2. That's because to use that export, JC 2.2 is minimal required implementation.

Maybe you are looking for