Java card simulation

i have to simulate the java card applet which is doing all crypto functions and
then i will communicate to it by WTK SATSA using eeprom image of the java card applet..
i don't have to install it on card, i hv to simulate everything..
is there a way to do it... or we need a licensed tool for it..
does WTK 2.5 cref and java card 2.2.2 cref will be able to communicate..
please help, i need this info. urgently

Are you referring to a Floppy diskette drive ?

Similar Messages

  • How does the Java Card simulator work? (Using NetBeans)

    Hi,
    I'm using NetBeans and am trying to simulate:
    Someone powering up the card, saving a value, and powering down... And then they power it up again, get the value, and power down.
    When I edit my APDU script to do the second part, the value I entered the first time is never stored, which probably means that when I 'run' my code, my application is loaded and everything is initialized again.
    How do I edit NetBeans to not install the application every time I hit 'run'? And not to initialize the values, so that when i power it up again, I can get a value stored in a previous running of a script?
    When I use powerup, powerdown and then powerup again, NetBeans doesn't powerup the simulator the second time. So understanding the Java Card Simulator would also help... where it is, how it runs, what options it runs with, etc.

    Hi Shane,
    I have not read anywhere else that the JC3 cards are not available, thank you so much for that tip! I am not doing it for research, but I am working on this alone and will have to deploy a card later on. I will be getting all the right versions now.
    I'll ask the question then, using just the JCDK:
    If I want to save a value on the card, and then need it at a later time, how do I go about it. Do I do the following?
    (1) Install the application on the card. (I know how to do this)
    (2) Run the simulator using -o "eeprom data filename"
    (3) Save the value using the APDU calls and Java code on the card + close connection.
    Code:
    public class MyApp extends Applet {
        private static byte[] data = {0x00, 0x00, 0x00};
        // Install method, method to register, process method that can call saveData or recallData, etc
        public static void saveData()
           // code to change data
           data = {0x01, 0x01, 0x01};
        public static byte[] recallData()
           // code to return data
           return data;
    }(4) Run the simulator using -i "eeprom data filename". get the value using recallData().
    Will selecting the app not make data initialize to {0x00, 0x00, 0x00} again?
    If I know this is the correct way of going about it, then I can work towards it getting done.
    From other examples I can see that this is probably the way it should work, but my data array always returns as {0x00, 0x00, 0x00}.

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

    Hi ,all
    Pls help me out.
    I am new to the Java Card Technology.
    I want to use javacrad as a part of my project.
    So Pls any one tell me whether there is any simulator available for the Smart Card & terminal.
    also tell me how to start using it .
    if yes pls send me the link..
    Pls pls pls help me.
    regards
    Mihir

    Hi Mihir,
    you could use the JCOP-Tools which are a plugin for Eclipse simulating an IBM JCOP smart card. These tools can be downloaded from:
    http://download.boulder.ibm.com/ibmdl/pub/software/dw/jcop/tools.zip
    You can find further information at:
    http://www-306.ibm.com/software/wireless/wecos/tools.html
    I hope that helps.
    Thorsten

  • Java Card simulator & Windows 2000

    Hi all,
    I chose to use the sun's card simulator (java card Development Kit Version 2.2_01) under windows 2K but from the readme, only WinNT 4.0 platforms are supported. Is there anybody that tried it under Win2K successfully?
    thanks in advance,
    KAnis

    works fine on w2k

  • Java Card simulator with MD5 MessageDigest support?

    Are there any Java Card simulators with support for the MD5 MessageDigest available? I checked both cref and jcwde, but they only support ALG_SHA.

    Thanks.
    By the way, do you happen to know if the newer JCOP cards (e.g. the NXP (Philips) JCOP 41 V2.2.1/72K USB
    NXP (Philips) JCOP 41 V2.2.1/72K) still support the MD5 MessageDigest? Older JCOP cards seem to support MD5, but at least in the publicly available JCOP 41 specs there is no mention of MD5 anymore; e.g. at http://www.bsi.bund.de/zertifiz/zert/reporte/0426b.pdf

  • How does the Java card simulator work? and other misc questions

    First, I have a class inherited from Applet. Okay, I did that.
    How do I convert this class to a CAP file? I mean I have a class file which is compiled by javac, do I use this file to convert into a CAP file? What is an AID? Do I make up this AID?
    In this .scr file (APDU Script), I understand the first 4 bytes, it means to create an Applet, but what about the rest? I know there are some intermixes of lengths and AIDs, I just can't decipher this.
    // create wallet applet
    0x80 0xB8 0x00 0x00 0x14 0x0a 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x6 0x1 0x08 0 0 0x05 0x01 0x02 0x03 0x04 0x05 0x7F;
    And here comes the main question?
    How does the simulator work? How do I generate the data that mimics what the card reader reads?
    Thanks
    Jack

    At first blush,
    I have these when executing the RMIPurse sample according to the user guide
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported type long of field interfaceHash.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported bytecode anewarray in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported bytecode new in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported bytecode invokespecial in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported parameter type String of invoked method <init>(java.lang.String) of class java.rmi.server.Operation.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported bytecode aastore in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported bytecode new in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported bytecode invokespecial in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported parameter type String of invoked method <init>(java.lang.String) of class java.rmi.server.Operation.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported bytecode aastore in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported bytecode new in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported bytecode invokespecial in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported parameter type String of invoked method <init>(java.lang.String) of class java.rmi.server.Operation.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported bytecode aastore in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported bytecode new in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported bytecode invokespecial in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported parameter type String of invoked method <init>(java.lang.String) of class java.rmi.server.Operation.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported bytecode aastore in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported bytecode new in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported bytecode invokespecial in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported parameter type String of invoked method <init>(java.lang.String) of class java.rmi.server.Operation.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported bytecode aastore in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported parameter type long of method dispatch.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported long type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported long type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported long type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported long type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported long type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported parameter type String of invoked method <init>(java.lang.String) of class java.rmi.UnmarshalException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported long type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported parameter type String of invoked method <init>(java.lang.String) of class java.rmi.server.SkeletonMismatchException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.UnmarshalException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.MarshalException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.UnmarshalException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.MarshalException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.MarshalException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.MarshalException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.UnmarshalException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.UnmarshalException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.MarshalException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Skel: unsupported parameter type String of invoked method <init>(java.lang.String) of class java.rmi.UnmarshalException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported type long of field interfaceHash.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported type long of field serialVersionUID.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode anewarray in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode new in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokespecial in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method <init>(java.lang.String) of class java.rmi.server.Operation.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode aastore in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode new in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokespecial in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method <init>(java.lang.String) of class java.rmi.server.Operation.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode aastore in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode new in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokespecial in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method <init>(java.lang.String) of class java.rmi.server.Operation.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode aastore in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode new in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokespecial in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method <init>(java.lang.String) of class java.rmi.server.Operation.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode aastore in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode new in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokespecial in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method <init>(java.lang.String) of class java.rmi.server.Operation.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode aastore in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode ifnull in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode goto in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokestatic in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method class$(java.lang.String) of class com.sun.jcclassic.samples.rmi.PurseImpl_Stub.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode anewarray in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode ifnull in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode goto in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokestatic in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method class$(java.lang.String) of class com.sun.jcclassic.samples.rmi.PurseImpl_Stub.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode aastore in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode ifnull in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode goto in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokestatic in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method class$(java.lang.String) of class com.sun.jcclassic.samples.rmi.PurseImpl_Stub.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode aastore in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode ifnull in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode goto in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokestatic in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method class$(java.lang.String) of class com.sun.jcclassic.samples.rmi.PurseImpl_Stub.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode aastore in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode aastore in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokevirtual in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method getMethod(java.lang.String, java.lang.Class[]) of class java.lang.Class.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode pop in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode ifnull in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode goto in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokestatic in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method class$(java.lang.String) of class com.sun.jcclassic.samples.rmi.PurseImpl_Stub.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode anewarray in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode aastore in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokevirtual in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method getMethod(java.lang.String, java.lang.Class[]) of class java.lang.Class.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode ifnull in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode goto in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokestatic in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method class$(java.lang.String) of class com.sun.jcclassic.samples.rmi.PurseImpl_Stub.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode anewarray in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode aastore in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokevirtual in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method getMethod(java.lang.String, java.lang.Class[]) of class java.lang.Class.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode ifnull in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode goto in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokestatic in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method class$(java.lang.String) of class com.sun.jcclassic.samples.rmi.PurseImpl_Stub.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode anewarray in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokevirtual in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method getMethod(java.lang.String, java.lang.Class[]) of class java.lang.Class.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode ifnull in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode goto in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokestatic in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method class$(java.lang.String) of class com.sun.jcclassic.samples.rmi.PurseImpl_Stub.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode anewarray in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokevirtual in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method getMethod(java.lang.String, java.lang.Class[]) of class java.lang.Class.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode ifnull in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode goto in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokestatic in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method class$(java.lang.String) of class com.sun.jcclassic.samples.rmi.PurseImpl_Stub.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode anewarray in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode ifnull in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode goto in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokestatic in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method class$(java.lang.String) of class com.sun.jcclassic.samples.rmi.PurseImpl_Stub.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode aastore in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported bytecode invokevirtual in clinit method.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method getMethod(java.lang.String, java.lang.Class[]) of class java.lang.Class.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode goto in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unhandled bytecode pop in clinit method, try a different compiler.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of method class$.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method forName(java.lang.String) of class java.lang.Class.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported return type String of invoked method getMessage() of class java.lang.Throwable.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method <init>(java.lang.String) of class java.lang.NoClassDefFoundError.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported long type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type long of invoked method invoke(java.rmi.Remote, java.lang.reflect.Method, java.lang.Object[], long) of class java.rmi.server.RemoteRef.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported long type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type long of invoked method newCall(java.rmi.server.RemoteObject, java.rmi.server.Operation[], int, long) of class java.rmi.server.RemoteRef.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.MarshalException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.UnexpectedException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported long type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type long of invoked method invoke(java.rmi.Remote, java.lang.reflect.Method, java.lang.Object[], long) of class java.rmi.server.RemoteRef.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported long type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type long of invoked method newCall(java.rmi.server.RemoteObject, java.rmi.server.Operation[], int, long) of class java.rmi.server.RemoteRef.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.MarshalException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.UnexpectedException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported long type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type long of invoked method invoke(java.rmi.Remote, java.lang.reflect.Method, java.lang.Object[], long) of class java.rmi.server.RemoteRef.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported long type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type long of invoked method newCall(java.rmi.server.RemoteObject, java.rmi.server.Operation[], int, long) of class java.rmi.server.RemoteRef.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.UnmarshalException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.UnmarshalException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.UnexpectedException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported long type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type long of invoked method invoke(java.rmi.Remote, java.lang.reflect.Method, java.lang.Object[], long) of class java.rmi.server.RemoteRef.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported long type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type long of invoked method newCall(java.rmi.server.RemoteObject, java.rmi.server.Operation[], int, long) of class java.rmi.server.RemoteRef.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.UnmarshalException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.UnexpectedException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported long type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type long of invoked method invoke(java.rmi.Remote, java.lang.reflect.Method, java.lang.Object[], long) of class java.rmi.server.RemoteRef.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported long type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type long of invoked method newCall(java.rmi.server.RemoteObject, java.rmi.server.Operation[], int, long) of class java.rmi.server.RemoteRef.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.MarshalException.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported String type constant.
      [convert] error: com.sun.jcclassic.samples.rmi.PurseImpl_Stub: unsupported parameter type String of invoked method <init>(java.lang.String, java.lang.Exception) of class java.rmi.UnexpectedException.At the first command prompt, I typed cref -o demoee
    and at the next command prompt, I typed ant all, and I got those error messages.
    Thanks, you are so nice to help :)
    Jack

  • Urgent ! writing a java card applet -APDU problem

    hi
    i'm fairly new to the java programming language. i'm trying to write an RSA java card applet to run on a java card simulator.
    I am not sure at all what code i need to write for the CLA byte in the command APDU and what code i need to write for the INS byte in the command APDU, and where exactly to put it in my program.
    if anybody knows please could you help me out.
    So far i have written the code below.
    thanx
    louise
    import javacard.framework.*;
    import java.math.*;
    import java.util.*;
    /*the public key is the public part of the key. Anyone
    can have it. It can only encrypt data, not decrypt.*/
    public class publickey extends Applet{
    //code of the CLA byte in the command APDU header
    final static byte publickey_CLA = (byte)0x00;
    //max number of characters for text message is 60
    final static char MAX_TXT_MSG = 0x3c;
    //MAX number of tries (3) before PIN is blocked
    final static byte PIN_TRY_LIMIT = (byte)0x03;
    //size of PIN must be 4 digits long
    final static byte PIN_SIZE = (byte)0x04;
    //below status word(SW) values are returned by applet
    //in certain circumstances:
    //signal that the PIN verification failed
    final static short SW_PIN_VERIFICATION_FAIL = 0x6300;
    //signal that PIN validation required for txt msging
    final static short SW_PIN_VERIFICATION_REQUIRED = 0x630;
    //instance variables declaration
    OwnerPIN pin; //variable for holding owners pin
    BigInteger n,e;
    String owner;//variable for holding owners name
    /*make a public key. Do not do it yourself, but
    make a public key from a private key.*/
    publickey(String iowner,BigInteger in,BigInteger ie){
    owner=iowner;
    n=in;
    e=ie;
    public void process (APDU apdu) {
    byte[] buffer = apdu.getBuffer();
    //check Select APDU command
    if((buffer[ISO7816.OFFSET_CLA] ==0) &&
    (buffer[ISO7816.OFFSET_INS] ==(byte) (0xA4)) )
    return;
    if(buffer[ISO7816.OFFSET_CLA] !=publickey_CLA)
    ISOException.throwIt
    (ISO7816.SW_CLA_NOT_SUPPORTED);
    /*read the key back from a string.*/
    publickey(String from){
    StringTokenizer st=new StringTokenizer(from," ");
    owner=st.nextToken();
    n=readBI(st.nextToken());
    e=readBI(st.nextToken());
    /*use the key to encrypt a 'message' m. m should be a
    number from 1 to n (n not included).
    use makemessage to convert your message to a BigInteger.
    BigInteger encrypt(BigInteger m){
    return m.modPow(e,n);
    /*make a string from this key.*/
    public String toString(){
    return owner+" "+printBI(n)+" "+printBI(e);
    /*help methods for reading and writing:*/
    final static int radix=36;
    static String printBI(BigInteger b){
    return b.toString(radix);
    static BigInteger readBI(String s){
    return new BigInteger(s,radix);
    /* these methods convert an arbitrary message,
    in the form of an array of bytes, to a message
    suitable for encryption. To do this random bits
    are added (this is needed to make cracking of the
    system harder), and it is converted to a BigInteger.*/
    BigInteger makemessage(byte[] input){
    /*to understand this part of the program,
    read the description of the BigInteger constructor
    (in the standard java help). */
    if(input.length>128 ||
    input.length*8+24>=n.bitLength())
    return new BigInteger("0"); //error! message to long.
    byte[] paddedinput=new byte[n.bitLength()/8-1];
    for(int i=0;i<input.length;i++)
    paddedinput[i+1]=input;
    paddedinput[0]=(byte)input.length;
    for(int i=input.length+1;i<paddedinput.length;i++)
    paddedinput[i]=(byte)(Math.random()*256);
    return new BigInteger(paddedinput);
    /*the inverse of makemessage.*/
    static byte[] getmessage(BigInteger b){
    byte[] paddedoutput=b.toByteArray();
    byte[] output=new byte[paddedoutput[0]];
    for(int i=0;i<output.length;i++)
    output[i]=paddedoutput[i+1];
    return output;
    class privatekey{
    /*the data of a key*/
    BigInteger n,e,d;
    String owner;
    int bits;
    Random ran;
    /*unimportant things, needed for calculations:*/
    static int certainty=32;
    static BigInteger one=new BigInteger("1"),
    three=new BigInteger("3"),
    seventeen=new BigInteger("17"),
    k65=new BigInteger("65537");
    /*make a new key. supply the name of the owner of the
    key, and the number of bits.
    owner: all spaces will be replaced with underscores.
    bits: the more bits the better the security. Every
    value above 500 is 'safe'. If you are a really paranoid
    person, you should use 2000.*/
    privatekey(String iowner,int ibits){
    BigInteger p,q;
    bits=ibits;
    owner=iowner.replace(' ','_');//remove spaces from owner name.
    ran=new Random();
    p=new BigInteger(bits/2,certainty,ran);
    q=new BigInteger((bits+1)/2,certainty,ran);
    n=p.multiply(q);
    BigInteger fi_n=fi(p,q);
    e=chooseprimeto(fi_n);
    d=e.modInverse(fi_n);
    /*read the key back from a string*/
    privatekey(String from){
    StringTokenizer st=new StringTokenizer(from," ");
    st.nextToken();
    n=readBI(st.nextToken());
    e=readBI(st.nextToken());
    d=readBI(st.nextToken());
    /*some help methods:*/
    static BigInteger fi(BigInteger prime1,BigInteger prime2){
    return prime1.subtract(one).multiply(prime2.subtract(one));
    static BigInteger BI(String s)
    {return new BigInteger(s);}
    BigInteger chooseprimeto(BigInteger f){
    /*returns a number relatively prime to f.
    this number is not chosen at random, it first
    tries a few primes with few 1's in it. This
    doesn't matter for security, but speeds up computations.*/
    if(f.gcd(three).equals(one))
    return three;
    if(f.gcd(seventeen).equals(one))
    return seventeen;
    if(f.gcd(k65).equals(one))
    return k65;
    BigInteger num;
    do{
    num=new BigInteger(16,ran);
    }while(!f.gcd(num).equals(one));
    return num;
    final static int radix=36;
    static String printBI(BigInteger b){
    return b.toString(radix);
    static BigInteger readBI(String s){
    return new BigInteger(s,radix);
    /*returns the public key of this private key.*/
    publickey getpublickey(){
    return new publickey(owner,n,e);
    /*the same encryption that the public key does.*/
    BigInteger encrypt(BigInteger m){
    return m.modPow(e,n);
    /*decryption is the opposite of encryption: it
    brings the original message back.*/
    BigInteger decrypt(BigInteger m){
    return m.modPow(d,n);
    public String toString(){
    return owner+" "+printBI(n)+" "+printBI(e)+" "+printBI(d);
    /*this main demonstrates the use of this program.*/
    public static void main(String[] ps){
    say("************ make key:");
    privatekey priv=new privatekey("sieuwert",92);
    publickey pub=priv.getpublickey();
    say("the public key:"+priv);
    say("************ encrypt message:");
    byte[] P="RUOK?".getBytes();
    BigInteger Pc=pub.makemessage(P);
    say("converted:\t"+printBI(Pc));
    BigInteger C=pub.encrypt(Pc);
    say("coded message: "+printBI(C));
    say("************ decrypt message:");
    BigInteger Pc2=priv.decrypt(C);
    say("decoded:\t"+printBI(Pc2));
    byte[] P2=publickey.getmessage(Pc2);
    say("deconverted: "+new String(P2));
    static void say(String s){
    System.out.println(s);

    Command APDU is not written in your source code, rather it is sent from PC or programmed Card Acceptance Device/ Card Reader/ Terminal.
    The code installed in the Java Card should be able to handle the Command APDU received and process it accordingly, and finally your code should be able to send out response APDU.
    You may think your code as a decoder, to retrieve each byte (CLA, INS, P1, P2, DATA, LC) using the Java Card API, you should be able to do it.
    Also, I notice in your code that you want to work out with strings, but Java Card does not support strings, chars, long, float, double ...
    to send out reponse APDU, there are certain steps that you can use, not just simply print like ordinary J2SE may use.
    hope this will help u

  • NetBeans java card platform

    Dear All,
    I need a java card simulator to debug my java card applet code.
    I try to use Java Card Platform on NetBeans IDE 7.1 for debugging purpose. After successfully building the applet and loading it onto the simulated card environment I try to select the applet instance using the following command through the Console.
    select //aid/3F564379F5/00279CD982
    in response I receive the following error.
    "Connection reset by peer: socket write error"
    Is anyone using Java Card Platform for debugging? I would be very happy to hear how to resolve this problem.
    Thanks in advance!
    Cheers!
    Mehmet

    Mehmet wrote:
    Hello Rohit,
    If you download the Java Card Development Kit (http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javame-419430.html#java_card_kit-2.2.1-oth-JPR)
    you will have a set of sample java card applets to use.
    You can use JPShell to download the cap files(compiled applet) onto the card and send ADPU to the card to see if you get correct response.
    Following link provides all the information to set up the environment and start developing java card applets using NetBeans IDE and GPShell.
    https://minotaur.fi.muni.cz:8443/~xsvenda/docuwiki/doku.php?id=public:smartcard:javacardcompilation
    I hope this can help.
    MehmetI already have , Netbeans 7.1 and now i have gpshell 1.4.4 ,i think netbeans is capable to making .cap file, did you mean that with use of gpshell i can connect with java card through reader? gp shell would work stand alone or we need to set this to netbeans? i read the link which u passed to me, it seems very good but "it seems very tough to implement" . HELL IS WAITING FOR ME... KIDDING DEAR,
    one last thing, anything other than net beans { here we create applet and it automatically create cap file} and gp shell are require to load applet onto the card? OR these is enough to implement wholo java card application- I asked this because i get the term JCOP and etc when i read uploading applet to card.
    anyways thanks for your help.

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

  • How to run Java Card Program in a Simulator

    I m Narendra Reddy studying in India and have taken Java Card for my B.E. final year project.
    i also acquire knowledge of Whole Java Card Development Life Cycle but i found much more difficulties to implement those ideas into java card.
    so, Will you please do me a favour and give me a complete solution if possible with an example.
    i also want each step with the commands, from the creation of Class file to the running of prog. in simulator.
    it will be very useful for me to head towards my project.
    Thank you,

    Just for the record,
    Since we are looking at different possibilities, there are couple of ways to achieve simulation/testing environment for current Java Card,
    1. "The Java Card Workstation Development Environment(JCWDE) tool allows the simulated running of Java Card applet as if it were masked in ROM. It immulates Card environment." Although, as Joe mentioned, it does not support;
    - package installation
    - applet instance creation
    - persistent card state
    - firewall
    - transactions
    - transient array clearing
    - remote method invocation
    - applet/package deletion
    Thus you can use 'jcwde' tool in combination of apdutool to test some
    of the Applet behavior(& JCRE) but not all. You have realized this when you tried 'sample' applets.
    2. JCDK2.2 also provide c-reference implementation of the Java Card. This(cref) is more robust way to test Applet. Although the catch with this is that Sun does not have SCSL(Community Source Licensing) program for Java Card(alas!) and this means you can not mask your applet into this reference implementation unless you get hold of source code somehow(source licensing is one(costly) way)
    3. Buy reader/card and figure out how to install applet for
    testing purpose.
    4. Buy kit from JC vendor containing reader/software/cards and use it
    (costly and hard to find JC2.2 implementation)
    1 and 2 are easier but not a real life solution(how many cards with intel/sparc processor anyway?). 3 and 4 are ideal but other way challenging. Yes, probably solution-1 is the right for your purpose.
    regard,

  • 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

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

  • 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

  • Java Card Applet Development

    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.

    1. Good.
    2. I suggest you start testing using the simulator, however if you want to test directly on the card at once, select your card reader using the /term command and use the commands as described in help to start sending APDUs to the card.
    3. This is not a part of the JCOP tools for eclipse (which is developed by IBM and maintained by NXP), but part of the JavaCard development toolkit developed and maintained by Sun. See http://java.sun.com/products/javacard/dev_kit.html.
    4. Read the above. None of this is part of JCOP tools for eclipse.
    5. As far as I know, there is no independent newbie guide for JCOP tools, but I would check out the help function included in the tools themselves if I were you.
    Good luck!

Maybe you are looking for