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

Similar Messages

  • 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.

  • Need suggestion regarding simulation of Java Card using a floppy

    Hi All,
    I am working on a project wherein I have to simulate a Java Card application using a floppy. I am writing my own Card Terminal and CardTerminalFactory. Thats what I have started working on. Will that serve the purpose or do I have to think about some other approach like just overriding the cardInserted method of CTListener class? I want to achieve communication between the host application and the floppy(which is my java card) Please advise.
    I would like to thank DurangoVa and Nilesh for helping me out sorting out the error in running the converter.
    Thanks in advance

    Are you referring to a Floppy diskette drive ?

  • 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

  • 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.

  • 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.

  • 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.

  • Simulator for java card

    hi
    i am new to java card technology...i am writing the applets in netbeans using java card plugin....the problem is i m not able to simulate the applet..it is showing build successfully, but wen i run the app it is showing nothing.....so can anyone suggest me a suitable simulator for the same....

    Hi,
    I assume you are after details on how to use the simulators? There are examples and documentation with the JC specifications and developer kit. Both of these are available from the Sun website [http://java.sun.com/javacard/].
    If you are after details on how to develop your own, the JC specifications outline the requirements for the JCRE and JCVM that you can use to implement a simulator.
    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

  • 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

  • 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

  • Question on "Writing a Java Card applet" by Ed Ort

    Hi,
    in the wallet apple i defined the variable
    short balance
    that is the wallet in the Sim, but i don't understand where the value of this variable is initialized the first time.
    Could someone help me?
    Thank you
    Luigi

    It's initialized to 0(zero) per the Java/JavaCard specification(either by the VM or at compile time).
    For myself, I prefer to explicitly initialize values.
    It terms of the application, it would be "initialized" with an initial deposit as mentioned by DurangoVA.
    Steve

  • Simulation of Smart Card Application

    Hi ppl,
    Sorry I have some stupid questions again. It's just after I've read some books but still I'm a little confused about some concepts, I really hope you guys can help me out.
    First, in order to simulate the smart card operation. What exactly is needed to implement? I thought it was just the card and the reader, I mean just two programs, one for card and one for reader, talking ato each other. But after I've read some books, some said it involes three entities, the host, that is the application, the terminal, usually the reader, and the card. So I wanna know how many entities are involved actually.
    All along I thought it was just two entities, the card and reader communicating using ISO7816-4 commands. But now I saw some books saying the 3 parties version. So is it they're actually talking about different scenarios? If a reader has CPU power then it can generate commands to the card and so there're only two parties. But if the reader is simply a device as an interface for converting the programmed commands into electronic signals for transmission, then 3 entities are needed. Is that the case? Well, this is just my wild guess. So what do you guys think?
    Thanz!!
    Franky

    So you mean that middle ware is actually at the transport level? So yes when I go to the ATM, the prompt that I got is an application that asks me for PIN and so the card is acting on behalf of me and the reader is acting on behalf of the card company? Did I get it right?
    And one more thing, so in the ATM scenario, is it assumed that we trust the machine? Bcoz we have to key in the PIN, so if it is compromised, it is a security problem. Or is it bcoz there is already a mutual authentication carried out between the card and the reader so if the I am asked for the PIN, I can trust my card for authenticaing the machine.
    And o...last question, more low level, how do the card determine is it is a ATR packet or transmission has already started? I mean how does the card know if it is still negotiating the transmission protocol(T=0 or T=1)or one of the transmission protocols is already in use?
    Thanz very much !!
    Franky

  • 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.

  • Basic Java Card/Card reader application question...

    Hello all,
    I have a basic question regarding java card applications. Do you always require a host application(on some PC/workstation server) to send and receive data from the java card (through the card reader using any of the available interfaces like OCF etc) or can you have a stand alone card reader application that interacts with java cards inserted into the reader?
    For example..in a mass transit application, you have a reader that reads an e-purse smart card that is swiped and does the necessary deduction of the fare from the card. In this case, where does the host application reside (there is no other host system involved other than the reader here? ) How is this done? Does the card reader carry the necessary code to interact with cards?
    Any information is greatly appreciated.
    Thanks for the time.
    Regards,
    Ajay

    Documentation is provided by the terminal vendors. Just think of it like this, there are drivers that read the card, but don't know what to do with the data without some form of middleware to process it.

Maybe you are looking for