Java card application and applet

Hi
I' am developing a java card application which has three applets (1-ID, 2-Purse, 3-Library). I mean the same card should be use for personal ID, purse, and as library card. Using eclipse I first have to create a new project.
File-New-New project-java card project. Then in the package Explorer view right click src then New-other-java card Applet. My question is because my java card application has more than one applet how do I add the other two. Should I add the other two by clicking src again or just add them under the same source code belonging to the java card Applet created at the beginning.

you mean by again doing right click src then New-other-java card Applet.

Similar Messages

  • Why my JCOP do not create CAPs for my java card application?

    I am using Eclipse 3.3.1.1 and JCOP tools3.1.2.
    When I create Java card application or applet, it doesn't create cap files for me automatically. Why?
    I used JCOP before, it always created new CAP files replacing the older ones when I saved the source code.
    Does the version of Eclipse conflict with that of JCOP?
    By the way I am using JDK 1.6 for my default lib.
    Thanks!

    Well it works. I tested it with your version.
    - Check out if your project has the JCOP nature.
    - Check via the Navigator view if the javacard folder is created, including the .exp and .cap file (you need to refresh the last folder)
    - Check if your Eclipse project setting have automatic build enabled, otherwise you need to trigger the build automatically
    - Try to refresh, clean and rebuild the project

  • Is it possible to simulate whole java card application on simulator?

    Hello all,
    currently i dont have any real java card yet,not either reader . I already made a simple applet and check its working by CJCRE (net beans simulator), it is working fine,
    now i want to move to host application which will communicate with java card via card reader. Is this possible to simulate complete application ( host application + java card applets)?
    I want to check it out that:- which line of java program would be helpful to know that:-
    1-"how real host application will talk to reader"
    2- how it connect and disconnect the reader
    3- how it send apdu to java card by reader
    and much more.
    I am using netbeans 7.1 and it is using CJCRE as a simulator....

    you mean to say this
    http://askra.de/software/jcdocs/app-notes-2.2.2/apduio.html
    I am quite confused now, i read this but still can not imagine the concept ,
    an applet code is :-
    public class GetName extends Applet
         final static byte CLASS     = (byte) 0x80;  // Class of the APDU commands
         final static byte INS_READ  = (byte) 0x02;  // instruction for the READ APDU command
         final static byte INS_WRITE = (byte) 0x03;  // instruction for the READ APDU command
         final static byte INS_DY_CO = (byte) 0x04;  // instruction for the READ APDU command
         final static byte[] text    = {(byte) 'A', (byte) 'M', (byte) 'I', (byte) 'T'};
         public static byte[] holder;
         public static void install(byte[] bArray, short bOffset, byte bLength)
            new GetName();
        protected GetName()
            holder = new byte[5];// allocation of memory in runtime
            register();
        public void process(APDU apdu)
              if(selectingApplet())
                   return;
            byte[] cmd_apdu = apdu.getBuffer();         
             if (cmd_apdu[ISO7816.OFFSET_CLA] == CLASS)
                   switch(cmd_apdu[ISO7816.OFFSET_INS])
                        case INS_READ:  
                        if ((cmd_apdu[ISO7816.OFFSET_P1] != 0) || (cmd_apdu[ISO7816.OFFSET_P2] != 0))
                        ISOException.throwIt(ISO7816.SW_WRONG_P1P2);
                        short le = (short)(cmd_apdu[ISO7816.OFFSET_LC] & 0x00FF); 
                        short len_text = (short)text.length;                      
                        if (le != len_text)
                        ISOException.throwIt((short)(ISO7816.SW_CORRECT_LENGTH_00 + len_text)); 
                        apdu.setOutgoing();                      
                        apdu.setOutgoingLength((short)len_text);
                        apdu.sendBytesLong(text, (short)0, (short)len_text);
                        break;
                    // here we save data from apdu and will keep inside the data byte                   
                        case INS_WRITE:
                    short lc = (short)(cmd_apdu[ISO7816.OFFSET_LC] & 0x00FF); 
                    Util.arrayCopy(cmd_apdu, (short) ((ISO7816.OFFSET_CDATA) & 0xff), holder, (short) 0, lc);
                        short len_holder_inside_write= (short) holder.length;
                       apdu.setOutgoing();
                    apdu.setOutgoingLength((short)len_holder_inside_write);
                    apdu.sendBytesLong(holder, (short) 0, (short) len_holder_inside_write);
                    break;
                    case INS_DY_CO:
                        short len_holder= (short) holder.length;
                    apdu.setOutgoing();
                    apdu.setOutgoingLength((short)len_holder);
                    apdu.sendBytesLong(holder, (short) 0, (short) len_holder);
                    break;
                        default : 
                        ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
             else
                    ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
    }now i think i need to make a another java file which would contain a main class, Is this both file would be inside a single java card project. and how these both would be connect to each other.
    for manually run a applet- there were two steps 1-
    C:\java_card_kit-2_2\samples\src\demo>jcwde jcwde-getname.app
    Java Card 2.2 Workstation Development Environment (version 0.18).
    Copyright 2002 Sun Microsystems, Inc. All rights reserved.
    jcwde is listening for T=0 Apdu's on TCP/IP port 9,025.
    and in second terminal we wrote-
    C:\java_card_kit-2_2\samples\src\demo>apdutool -nobanner -noatr getname.scr > ge
    tname.scr.jcwde.out
    Here it is clear that, if i will use javacardio then no need to pass the apdu from a file .....but i am confuse about how it possible, ie. is both file lie in same project , because i m using simulator so i need to run these both file simoltaneously........give me some roughly steps to implement this.

  • Reg: java card application needs

    Dear experts,
    i am a newbie to java card, After a lot of googling, i found JACCAL to aid java card programming development. I have downloaded and installed it but i dont know how to use it? any help will be greatly appreciated,
    By the way, i need to know why do we need IDE or tools for java card programming?. Cant we complete right from typing program to till burning on card using the java card kit ? please correct me, if i am wrong.
    I have tested the sample programs successfully with java card kit 2.1.2. My doubt is, What are the needs for java card application, like what CAD, card and tools should be used or purchased(most of them ,i found from the web are outdated like JCOP, OCF).
    Thanks in advance.
    SRI.

    you mean by again doing right click src then New-other-java card Applet.

  • Beginner's Question on simulation of java card application

    Hi,
    I am trying to run a basic Java card application.
    To simulate the java card application, I created jcwde.app and tried C:\>jcwde -p 9025 jcwde.app
    I got and exception like:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: markHeap
    at com.sun.javacard.impl.NativeMethods.markHeap(Native Method)
    at javacard.framework.Dispatcher.cardInit(Dispatcher.java:188)
    at javacard.framework.Dispatcher.main(Dispatcher.java:63)
    at javacard.framework.JCWDEDispatcher.main(JCWDEDispatcher.java:28)
    at com.sun.javacard.jcwde.Main.run(Main.java:85)
    at com.sun.javacard.jcwde.Main.main(Main.java:148)
    Can anyone help me to find out the reason for this exception?
    The content of jcwde.app is
    // applet AID
    com.sun.javacard.installer.InstallerApplet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0x8:0x1
    wallet.Wallet
    Thanx in advance.
    anju

    I see terms like ...
    Core Java: The main libraries.
    JDK: (J)ava (D)evelopement (K)it) - AKA: (S)oftware (D)evelopement (K)it although the terms are not exactly synonomous
    J2EE:(J)ava 2 (E)nterprise (E)dition (builds on the J2SE with additional librarities for true business application building)
    J2SE: (J)ava 2 (S)tandard (E)dition (The core libraries for general Java program developement, w/o the extra stuff that is in the J2EE
    Go to java.sun.com and check out the tutorials, the readme files that come with the downloads, the release notes, etc ... HTH

  • Auto start Java Card application

    Hello,
    is it possible to start a Java Card application from the SIM card right after the mobile is switched on?
    I talked to a guy from a SIM card manufacturer and he told me it's possible since the device checks on start if a Java Card application is present to display it in the phone's menu, but it's device dependant how it's done and if the application really will be started (which sounds kind of strange).
    Can someone give me more details if it's possible to auto start a application and how it's done ( code snippet would be great ; )?
    Thanks in advance,
    teric

    The first event after ME startup, which STK applet could catch is Terminal Profile.
    So, in applet class constructor should be smthng like
    ToolkitRegistry reg = ToolkitRegistry.getEntry();
    reg.setEvent(EVENT_PROFILE_DOWNLOAD);
    and applet will trigger on Terminal Profile arrival.

  • Can we test java card application on  2 simulators simultaneously?

    to create a java card applet we also need to write card reader code to select that applet from card.but can we test it using simulators.how can 2 simulators (1 for card applet and other for reader) run simultaneously?

    Hi,
    to create a java card applet we also need to write card reader code to select that applet from card.but can we test it using simulators.how can 2 simulators (1 for card applet and other for reader) run simultaneously?Do you intend to have both simulators talking to each other or is the intent to code a host application that communicates with both cards at the same time?
    If you are using CREF, you can start the second instance on a different port. You would then configure your host application to look for cards on both ports.
    Cheers,
    Shane

  • Writing Java Card Application

    Please I am doing my final year project on secure mobile application using Java Card Technology.
    I need to write and an application that can send SMS on a SIM card to another SIM card with the same application. The application will have a server side which manage the storage of messages and at the same time communicate information to the client on the SIM remotely. I am suppose to use wi-fi (TCP/IP) for transmission.
    Can anybody please give me ideas and possible working codes and simulators.
    I mean step by step procedure of how to start.
    THANK YOU.

    Dear Friend,
    I would recomend you to start with learning 3GPP TS 43.019. Please surf the internet and download it. There you can also find a sample applet using SIM API.
    For a simulator you can download JavaCard Development Suite from Gemalto web site.
    Yours
    Dmitri

  • Application and Applet

    Is it possable to run one program that reads in values threw a normal java application and then calls on an applet to display something?

    It sounds like you haven't grasped the fact that you can write a straight Swing application with a full graphics interface which isn't an Applet (I must admit that when, somewhere back in the age of the dinosaurs, I first started to read about Java I was confused by the emphasis on applets, which are really not very useful).
    Such an application has a main() method as usual, but all that the main() usually does it to create an object which extends JFrame and call setVisible(true) on it. From that point all the action is in response to user generated events on the window.

  • Java card simulator and WTK communication problem.

    Hi ,
    I am a newbie to java card .I am doing project on java card based sim.
    For that I am using JavaCard SDK 2.2.2 and WTK 2.5.2 .
    Now when i am trying to connect to cref(java card simulator) from java card midlet,I am getting protocol mismatch error.This is because of WTK runs on slot T=0 and cref runs on T=1.
    then i tried with jcdk3.0.1 classic edition.It provides cref configured to run on both slots T=0 and T=1.
    But when I tried to deploy jcrmi applet on cref running on T=0 i am getting the same error "Protocol mismatch error".
    Can anybody please tell, if there is any way to configure cref to run with T=0?
    Please reply ASAP, as i am stucked with the problem from more than a month.
    Thanks in advance,
    Saviy

    Thanks Anki for replying.
    I am trying to run RMISample from development kit.With steps given in guide as follows
    1.cref -o demoee
    2.Navigate to the
    JC_CLASSIC_HOME\samples\classic_applets\RMIPurse\applet
    directory.
    3.ant all
    it works fine but when i do it with following steps:
    1.cref -o -t0 demoee
    2.Navigate to the
    JC_CLASSIC_HOME\samples\classic_applets\RMIPurse\applet
    directory.
    3.ant all
    i am getting protocol mismatch error.

  • Java card, problems uploading applet to Nokia 6131 NFC using Jcop + Eclipse

    Hi, we are trying to load an applet in this mobil phone ( [Nokia 6131 NFC|http://wiki.forum.nokia.com/index.php/Nokia_6131_NFC_-_FAQs] )
    and NXP people has redirect the support to this forum: [JCOP Tools|http://72.5.124.111/thread.jspa?threadID=5199227&tstart=329]
    So;
    This is the complete command sequence:
    >  /term "winscard:4|OMNIKEY CardMan 5x21-CL 0"
    --Opening terminal
    /card -a a000000003000000 -c com.ibm.jc.CardManagerresetCard with timeout: 0 (ms)
    --Waiting for card...
    ATR=3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 02 00    ;....O..........
        00 00 00 69                                        ...i
    ATR: T=0, T=1, Hist=804F0CA00000030603000200000000
    => 00 A4 04 00 08 A0 00 00 00 03 00 00 00 00          ..............
    jcshell: Unable to select Card Manager or invalid FCI: Unknown Global Platform Java Card.
    Subsequent commands might fail! Inspection might not be possible!somebody knows something about this error?
    Thanks in advance!

    The same!
    - /terminal pcsc:4
    --Opening terminal
    /atr--Waiting for card...
    ATR=3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 02 00    ;....O..........
        00 00 00 69                                        ...i
    T=0, T=1, Hist=804F0CA00000030603000200000000
    /select A00000030603000200000000 => 00 A4 04 00 0C A0 00 00 03 06 03 00 02 00 00 00    ................
        00 00                                              ..
    (0 msec)
    <= 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 02 00    ;....O..........
        00 00 00 69 00 00 00 00 00 00 00 00 00 00 00 00    ...i............
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
        00 00 00 00 00 00 00 00 00 00 00 00                ............
    Status: 0x0000
    Error code:     0 (0x0000)
    Offending APDU: 3B8F8001804F0CA000000306030002000000006900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    Wrong response APDU.

  • Java Card Product and Price List

    Where to find the Java Card, Card Reader to read Java Card and its Price List issued by Sun Microsystems.I want these products and price list.
    What is the tool needed to install the .CAP file in to Java Card?. I have read from the Sun Material, that there will be a off-card installer that loads the binary file of .CAP to Java Card through the CAD device. Where to find the off- card installer?
    I had tested a sample application in Eclipse IDE with JCDK 2.2.2 and EclipseJCDE.
    Please anyone provide me the details
    Edited by: sachindev on Oct 24, 2007 6:22 PM

    Hi there,
    I found this site with everything that you might need, I would say that prices are reasonable (correct me if I am wrong):
    Cards: http://www.smartcardsource.com/cards.htm
    Readers: http://www.smartcardsource.com/readers1.htm
    SDK: http://www.smartcardsource.com/sdk.htm
    Hope it helps...

  • Problem with Java-based application and WebVPN

    Hello. Could you please help me in find out any specification/known limitations in using Java-based applications through WebVPN in Cisco ASA 5520 v8.3(2).
    A customer of mine has got in trouble in using a Java viewer for graphical files that is invoked by another application (this one correctly served via WebVPN), that cannot be launched because JVM does not find it (NullPointer).
    Our suspects are generically about the URL rewriting of the WebVPN and/or unsupported configuration in the ASA SSL certificates vs Java.
    Any hint about where to search or what to try?
    Thanks.

    Hello. Could you please help me in find out any specification/known limitations in using Java-based applications through WebVPN in Cisco ASA 5520 v8.3(2).
    A customer of mine has got in trouble in using a Java viewer for graphical files that is invoked by another application (this one correctly served via WebVPN), that cannot be launched because JVM does not find it (NullPointer).
    Our suspects are generically about the URL rewriting of the WebVPN and/or unsupported configuration in the ASA SSL certificates vs Java.
    Any hint about where to search or what to try?
    Thanks.

  • Step by step approach to develope the java card application

    Do anybody know how to develope a smart card application using java card.i have downloaded java card kit,but the documentation provided by the sun is bit complex to use.
    so please anybody know how to proceed?
    It would be appreciated if i am given a step by step approach to develope a smart card application using java card.

    Do anybody know how to develope a smart card
    application using java card.i have downloaded java
    card kit,but the documentation provided by the sun is
    bit complex to use.
    so please anybody know how to proceed?I would suggest to read these articles
    http://developers.sun.com/techtopics/mobility/javacard/articles/
    Jan

  • Java card api and long

    Java card runtime does not have support for primitive long..... but if you absolutly had to have a long, how could one do it.
    I am thinking it would be some sort of byte[] representation. But I havent found any information. Can someone point me to the right direction

    The int keyword and its 32-bit integer data type are optionally supported.
    what is wrong with using a byte array ?
    you can convert long to byte array and vice versa with your
    own code.

Maybe you are looking for