Need Help For Java Card Development

I am a beginner in java card technology , I am working on a project in which i need to send some instructions to smartcard store in smartcard, i have created GUI in java swings, but don't how to start communication between java swings application and smart card . Please Guide me to Possible way. Thanks in Advance .

Hi,
what do you exactly wanna know?
The syntax of APDU sending to smart card and response or the way to communicate with card reader?
Also make clear if you wanna know about GP instruction (load, install, select,...) or calling methods of your applet on smart card
Regards,
Hana

Similar Messages

  • What Java compiler for Java Card development ?

    What Java compiler and options should be used for Java Card development with the goal of generating correct, and (secondarily) small or/and fast code after conversion to Java Card bytecode using converter ?
    In particular
    - Is use of JDK 7 approved by Oracle for Java Card development? That would solve security problems associated with (the web components of the JRE of) some earlier JDK, including the latest JDK6. The JCDK 3.0.4 release notes states "+the commercial version of Java Development Kit (JDK software) version 6 Update 10 (JDK 6 Update 10) or later is required+, but that does not answer that question.
    - Anyone had _bad_ experience (like incorrect or disastrous code) with the Java compiler bundled with Eclipse ? I have seen at least one case where org.eclipse.jdt.core_3.7.3.v20120119-1537.jar produced slightly more compact code than javac.
    - Anyone had _bad_ experience with javac in jdk1.3 ? In an applet involving a "finally" clause, I've seen it generating more compact code than later javac (which in my test triplicated the code for the finally clause).

    What Java compiler and options should be used for Java Card development with the goal of generating correct, and (secondarily) small or/and fast code after conversion to Java Card bytecode using converter ?-target -source may be required to generate compatible byte code. Depending on the CAP file converter being used debug information may also help. Remember that Java Card is a subset of the Java language (also there are short opcodes that Java doesn't have etc) so a lot of the work for optimisation is done by the converter or the JCRE. You can look at the JCA code generated to determine what works best for your applets. There are also some ways of stripping out dead code etc from JCA files (return statements after a throw etc) to reduce your code size. Most of the speed optimisations come from your code (avoiding context switches and unnecessary security/access checks).
    The compactness of your Java Card binary may not be directly related to the size of your compiled Java code. It can depend on the converter you use and any optimisaitons the JCRE might try to do when the code is loaded.
    - Is use of JDK 7 approved by Oracle for Java Card development? That would solve security problems associated with (the web components of the JRE of) some earlier JDK, including the latest JDK6. Java Card does not use any of the libraries from the JDK/JRE. All of the libraries are provided by the JCRE on the smartcard.
    The JCDK 3.0.4 release notes states "+the commercial version of Java Development Kit (JDK software) version 6 Update 10 (JDK 6 Update 10) or later is required+, but that does not answer that question.Anything above JDK6u10 is supported. If you use Java 7 you may need to add a -source and -target flag when compiling.
    - Anyone had _bad_ experience (like incorrect or disastrous code) with the Java compiler bundled with Eclipse ? I have seen at least one case where org.eclipse.jdt.core_3.7.3.v20120119-1537.jar produced slightly more compact code than javac.We generally use the Eclipse compiler as we find that we get more deterministic builds. When CAP files are sent for security review it is helpful to have the reviewer able to generate a CAP file that matches the one you sent to confirm the binary is what you say it is.
    - Anyone had _bad_ experience with javac in jdk1.3 ? In an applet involving a "finally" clause, I've seen it generating more compact code than later javac (which in my test triplicated the code for the finally clause).We do not use anything less than Java 6 for compilation.
    - Shane

  • Need help for Java Certification

    Hello friends,
    I am preparing for SCJP 1.4. Those who have passed this exam pl help in prepration. Which books I should follow and some usefull sites which can help in preparing for the exam.
    I will appreciate any kind of help.
    Thanks,
    Regards,
    Nitin Goyal

    Hello friends,
    I am preparing for SCJP 1.4. Java certification, what do you need it for?I hear it's a new requirement to become a cab driver in Jakarta.

  • Need help for java program

    Hi,
    I need help with my web application. When i tried to run it using
    localhost:8080
    it's giving me error that
    signup.do file is not available.
    can someone tell me what could be wrong with my code?
    I want to know what is .do file and what needs to do to have remove the error
    I have also used struts config file.
    Please help me.
    Message was edited by:
    star4588

    See struts documentation here http://struts.apache.org/1.2.9/userGuide/building_controller.html#action_mapping_example
    you should have something like that :
    <action-mappings>
            <action
                path="/signup"
                type="org.apache.struts.webapp.example.SignupAction"
                name="signupForm"
                scope="request"
                input="/signup.jsp"
                unknown="false"
                validate="true" />
        </action-mappings>in your struts-config.xml.
    Hope That Helps

  • Need help for Java Strings

    Hi ppl,
    i hav a code which has to do some actions on the strings retrieved from the database. The code is in java swings
    I need to know, how do i check if there is a space between strings.
    For eg Kevin Dcosta. (There is a space between Kevin Dcosta)
    Please can someone provide me with the Java code for the same so tat i can append to my code. Or is there any readymade method in Java for the same??
    Thanks
    Divya..

    Hi,
    Go thr StringTokenizer Class it will help u out!........place whatever string u r reading in pu those in stringtokenizer like
    StringTokenizer str=new StringTokenizer(tmpmessage, " ");
    while(readTokenizer.hasMoreTokens())
    String name=readTokenizer.nextToken();
    /****** do whatever the action u want to do*************8
    }

  • Need help for Java Programming asap plzzzzzzzzzzzzz

    Here is the work: (Im writing it coz I wasn't able to attach it)
    Introduction
    In geometry, a straight line is the shortest distance between two points.
    A line may be characterised by its end points and its length.
    A line connects the points P1 and P2.
    The point P1 has coordinates {X1,Y1}.
    The point P2 has coordinates {X2,Y2}.
    The length of the line joining P1 and P2 is given by the equation:
    { (X2 - X1)2 + (Y2 - Y1)2 }1/2
    Those of you who are familiar with geometry will recognise the equation as being the well known Pythagoras equation for the hypotenuse of right angled triangles.
    Requirements
    Develop a class specification for the class Point.
    Write a short test program and test plan for this class.
    For example:
    //pointTest.java
    main(...)
    Point P1;
    P1.create(24,16); // create a point with coordinates {24,16}
    P1.display(); // display the {X,Y} coordinates of P1
    Develop a class specification for the class Line.
    Write a short test program and test plan for this class.
    For example:
    //lineTest.java
    main(...)
    Point P1 = new Point();
    P1.create(24,16); // create a point with coordinates {24,16}
    Point P2 = new Point();
    P2.create(33,42); // create a point with coordinates {33,42}
    Line L1 = new Line();
    L1.create(P1,P2); // create a line using points P1 and P2
    System.out.println( L1.length() ); // display the length of line L1
    Line L2 = new Line();
    L2.create(12,30,28,16); // create a line using coordinates {12,30}, {28,16}
    L2.display(); // display the coordinates of both points and the length of the line
    Application
    We wish to determine the length of the boundary of any regular or irregular polygon .
    The polygon may have up to 6 sides.
    The user should be prompted to enter the number of sides and the coordinates of each vertex point.
    The program should then calculate and display the total length of the boundary.
    You should write an application to implement this using your Point and Line classes.
    What I should have at the end
    The following:
    ? A listing of the files Point.java, the class test program and results.
    ? A listing of the files Line.java, the class test program and results.
    ? The application program and results.
    Note 1: All code must be written in java.

    Point P1 = new Point();
    P1.create(24,16); // create a point with coordinates {24,16}That's a terrible idea. If that was actually in your requirements, then whoever wrote it should stop teaching Java right now.
    We have constructors to initialize objects with sensible, meaningful values. Creating a new Point object without any values and then calling a "create()" method to set the values is a pretty stupid approach. Not only does it ignore the usefulness of a constructor, it also ignores the convention that methods called "create" should actually create something (and not just set values).

  • Need help - basic Java card communication ???????

    Please could someone tell me if JavaCard is conforming to OpenPlatform 2.0.1 how does it communicate to host application, through wincard.dll or thorough some other library ?
    Thanks.

    it depends wich JavaCard, I know that only JCOPs are fulli compliant to 2.0.1 and new ones partly to 2.1 ...
    Communication is depending on the reader that you are using, normally pc/sc interface will do. Otherwise you need some special libraries, like for contactless readers & cards ....

  • Need Help for Java Homework Assignment, Can someone Please help me ?

    This is the program that I am supposed to write, and I am terrible confused, as it takes at least 3 different files.
    Write a class named GroceryList that representss a person's list of items to buy from the market, and another class named GroceryItemOrder that represents a request to purchase a particular item in a given quantity. (I.E. four boxes of cookies).
    **The GroceryList class should use an array field to store the grocery items, as well as keeping track of its size (number of items in the list so far). Assume that a grocery list will have no more than 10 items. A GrocerList object should have the following methods:
    public GroceryList()
    Constructs a new empty grocery list.
    public void add(GroceryItemOrder item)
    Adds the given item order to this list, if the list is not full (i.e., has fewer than 10 items).
    public double getTotalCost()
    Returns the total sum of all grocery item orders in this list.
    The GroceryItemOrder class should store an item quantity and a price per unit. A GroceryItemOrder object should have the following methods:
    public GrocerItemOrder(String name, int quantity, double pricePerUnit)
    Constructs an item order to purchase the item with the given name, in the given quantity, which costs the given pricer per unit.
    public double getCost()
    Returns the total cost of this item in its given quantity. I.E. 4 boxes of cookies that cost 2.30 per unit, have a total cost of 9.20.
    public void setQuantity(int quantity)
    Sets the grocery item's quantity to be the given value.
    Any suggestions would be sincerely appreciated.
    Thanks.

    Pete,
    I having difficulty with the main class, and getting console to store a users input into a string array ... I will post the code that I have so far. Sorry I am trying real hard to learn ... and just having a frustrating time.
    This is what I have in the main file.
    import java.util.*;
    public class Chapter_8 {
         public static void main(String []args){
              Scanner console = new Scanner(System.in);
              System.out.println("Please enter the first item of your list");
              String[]GroceryList = console.next();
              System.out.println("Please enter the next item of your list");
              String[]GroceryList = console.next();
              System.out.println("How many would you like to buy?");
              int quantity = consolenextInt();
         }This is what I have in the GroceryItem Class file:
    public class GroceryList{
    public GroceryList(){
    Static String []GroceryList ={"beans", "macaroni", "milk", "cheese", "bread", "eggs","hamburger","Hotdogs","peas","cookies"};
    for(int i=0;i<5;i++){
    System.out.println(GroceryList);
    And the final file that I have is the GroceryItemOrder Class file:public GroceryItemOrder(String name, int quantity, double pricePerUnit){
    this.name = name;
    this.quantity = quantity;
    this.pricePerUnit = pricePerUnit;
    public double getCost(){
    public void setQuantity(int quantity){
    Sorry, I know it isn't much, that's why I am frustrated.
    Thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Need help for java and linux

    Hi, guys,
    I am being involved in a project.My current task is to build an interface using java. This interface will obtain some information from a linux-based software called NistNet, which is done by C and has GUI as well. My question is, can I use this java-based interface to obtain some information that is typed in this NistNet'GUI? If I can, how can I do that?
    Any hint available?
    Thanks!

    You can bridge between Java and C using the "Java Native Interface" (JNI). There used to be a good tutorial on this site but it vanished for no apparent reason in some resent update, so try a websearch.
    See also
    http://java.sun.com/j2se/1.4/docs/guide/jni/
    http://java.sun.com/j2se/1.5.0/docs/guide/jni/

  • Why do we need IDE or tools for java card programming?

    Hi,
    I am a newbie to java card, using java card kit tools themself, we can test and burn the code into card right?
    then why do we need IDE for java card, please correct me , if i am wrong,
    Thanks in advance,
    Sri.

    Dear Sri,
    We have compiler, linker etc for every language starting of from C or C++ or Java. JDK has all the tools necessary to develop and run a Java program. Similarly Java Card Development Kit has all the tools for developing and deploying a Java Card applet. But what an IDE does is too integrate all these tools and make it easier for the JavaCard programmer to develop his applets. Just like Eclipse is used for Java applet development.And not everytime the code is burned to the card. Its only during masking code is burned to the card, i.e if u can call it burning. Masking makes an applet permanent on the card.

  • How to start java card development?

    Good Evening all,
    I am novice for java card development , from last some days I study java card and terms related to it, now i have some knowledge about applets , and API. as i read about java card 2 and 3, I think i moved to java card 2 that's why i download jcdk 2.1.
    Now i want to do something in development rather than further conceptual study. Frankly speaking I m confused where to move because different sites have different point of view so i want to execute my knowledge which i earned from last some days...
    so I want to ask
    1- which IDE would be best for java card development? { eclipse or net beans or something other}
    2- what things i would be require during java card application?{ java sdk version? jcdk version? ocf? or what}
    3- at start i want to use simulation technique to test what i made and how its work, so for this which tool or IDE would be best work for me,
    so kindly request you to guide me and show me the path where i can move and achieve what i want..
    ---------------------------------------------------------------------------------------------------Thank you in advance------------------------------------------
    Edited by: 911936 on Feb 2, 2012 10:01 AM

    Hello umer,
    last night it seems very tough to execute sample program of jcdk 2.2 but finally i make it, and i also i got the IDE - net beans that is very good for java card...
    I think i should share my knowledge here for next novice people...
    ----------------------------------------------------------------------------java card development require-------------------------------------------------------------
    Because here we use java for java card so we require
    1- java development kit (JDK) - use below link to get this.
    [get jdk here|http://download.oracle.com/otn-pub/java/jdk/6u30-b12/jdk-6u30-windows-i586.exe]
    2- Java card require java card development kit (JCDK) I think java card version 3 is latest but i used jcdk 2.2.1
    [get jcdk here|http://download.oracle.com/otn-pub/java/java_card_kit/2.2_01/java_card_kit-2_2_01-win-gl.zip]
    now  i think this is enough to start java card development...
    follow below steps
    1- install jdk 6 in c:/java/jdk1.6
    2-keep jcdk in c:/java_card_kit-2_2
    3- open command prompt and run
    a)-set JC_HOME=c:\java_card_kit-2_2
    b)-set JAVA_HOME=c:\java/jdk1.6
    c)-set PATH=%JC_HOME%\bin;%PATH%
    4-there are some sample project in scdk, if you want to get confidence , u should run one of them..
    run command- jcwde jcwde.app { jcwde is a simulator where u check what u made }
    and run this command in another command prompt- apdutool -nobanner -noatr demo1.scr > demo1.scr.jcwde.out
    You can get detail of 3 and 4 step from cJDK_Users_Guide.pdf which is present in jcdk.
    ------------------------this  is all which u need to do to get confidence in java card, but dont be over confident because in reality "the ball is not in your court yet"
    Note- if you are searching which java IDE is best for java card development then
    [click here- this is one of the best ide for java card|http://dlc.sun.com.edgesuite.net/netbeans/7.1/final/bundles/netbeans-7.1-ml-windows.exe]
    Edited by: 911936 on Feb 3, 2012 8:58 AM

  • Updated link to Java Card Development Kit and related documentation

    Note that the right link for Java Card Development Kit and related documentation is
    http://www.oracle.com/technetwork/java/javame/javacard/download/index.html
    It used to be
    http://www.oracle.com/technetwork/java/javacard/downloads/index.html
    which is still on-line, but the links there are dead and sometime to obsolete stuff.

    If you don't have those directories, obviously, you don't have the source release with cryptographic extensions. You have a different release.
    The version you downloaded isn't a source release but you still have the full kit.
    For the src release, contact $un for a license.

  • Seeking Help for Guidance in developing a product using JAVA CARD

    Hi All,
    I am using windows environment with netbeans 6.8 as developer tool and MySql Server connectivity for back end process.My requirement is to develop applets and installing them to my Smart card and reader.my question is
    1. how i am supposed to create applets to get the student id of particular student whose id is already registered in the database?
    2. how to install them into the smart card?
    3.what are the commands i am supposed to follow if other than APDU commands?
    4.i found there is APDU commands but what do that each CLA,INS,p1,p2,Lc,le..commands used for?how can i use them in my creation of applets.i found the command varies for certain requirements.
    5.if possible please help me with a small example so that i will start developing it.
    can anyone help me in developing this application.i will be so helpful if anyone helps me in guiding me to develop the java card product.
    Edited by: Sijukj on Mar 4, 2010 7:04 AM

    Hi,
    Welcome to the wonderful world of embedded Java development!
    Sijukj wrote:
    1. how i am supposed to create applets to get the student id of particular student whose id is already registered in the database?The first step is to download the Java Card Development Kit (JCDK) from the Sun website (along with the related documentation/specifications). If you plan on using your code on a real card, I would recommend JC version 2.2.1 or 2.2.2. If it is sufficient to run your applet on a simulator (as a proof of concept or for assignments) with no intention on running on real hardware you could go for JC 3.0.2 and use the supplied simulator. This version of JC does not have commercially available cards as of yet.
    Once you have the applet coded and installed on your card, you would personalise the card for the card holder. This means loading card holder specific data into your application. This may also involve registering the smart card ID with the student in your database.
    2. how to install them into the smart card?The procedure for loading and installing applets is outlined in the Java Card documentation (available with the JC development kits from Sun) and the GlobalPlatform card specifications (available from [http://www.globalplatform.org]). You can look into some open source tools for doing this (GPShell and the Java Card Development Kit).
    3.what are the commands i am supposed to follow if other than APDU commands?This depends on what you are trying to achieve with your applet. If you want interoperability you could implement a standard like ISO7816 or IOS24727. This is a lot of work so you may just want to implement the proprietary you require for each operation you need (e.g. set student ID, get student ID etc).
    4.i found there is APDU commands but what do that each CLA,INS,p1,p2,Lc,le..commands used for?how can i use them in my creation of applets.i found the command varies for certain requirements.These are defined in ISO7816 part 4.
    The CLA byte gives information on the command you are sending such as secure messaging, command chaining, ISO or proprietary command
    The INS is the instruction or command you are trying to perform
    P1 and P2 are parameters to the command. These may not be required for each command but are able to be used to convey further information to the applet.
    Lc is the length of the data field you are sending (e.g. for a PUT DATA command this would be the amount of data you are sending)
    Le is the length of the data you expect to receive back from the card. If this is absent you do not expect the card to return any data, 0x00 means send all the data you have left (up to the limit of the response APDU)
    5.if possible please help me with a small example so that i will start developing it.You can find example code in the Java Card Development Kit. There are a wide range of examples there that can help you get started.
    Cheers,
    Shane

  • Need help for equipments for java card with RFID technology .

    I 'm doin a project using java card with RFID technology.Can ne one give me exact equipments for java card reader & writer for RFID technology?
    I need to buy these things from UK.Can ne one provide me some product list & as well as the exact pricelist?
    plz reply me asap.

    I 'm doin a project using java card with RFID
    technology.Can ne one give me exact equipments for
    r java card reader & writer for RFID technology?I guess with "RFID" you are referring to "contact-less javacards"?
    If yes, one keyword for you is "Mifare", a industry standard for smartcards with dual interface (contact-based and contactless).
    Jan

  • Help about running Java Card developement Kit Demo

    I am following the Java Card development kit step by step. I have set all environments but I could not run the demo at all. D:\JAVACARD\SAMPLES\SRC\DEMO>
    if I type "jcwde jcwde.app" at the demo directory, it tells me that, jcwde is not an intenal or batch file command. when I copied the jcwde.bat from bin directory to demo directory, it run but a lot of erros.
    I will be glad if somebody can help to overcome this initial and very important steps in my adventure to smart card.
    Thanks

    Thanks everybody for their contribution and suggestion. I have been able to make the demo works apart from demo1 which still give problems.
    if I type jcwde jcwde.app, it gives me the following errors.
    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.
    Exception in thread "main" java.lang.IllegalAccessError: class javacard.framewor
    k.JCWDEDispatcher cannot access its superclass javacard.framework.Dispatcher
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    3)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:246)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
    at com.sun.javacard.jcwde.Main.run(Main.java:77)
    at com.sun.javacard.jcwde.Main.main(Main.java:141)

Maybe you are looking for

  • How to use iMac as remotely accessible home media server

    First time poster, and thanks in advance for any help that any of you might be able to provide. -- Josh I have a mid-2007 iMac, several AppleTVs and Apple mobile devices, and a 2014 Macbook Pro coming at the end of the week (more detailed info below)

  • Problem when calling the XI web service

    Hi all , I have configured the XI web service and generated its WSDL file. Following is the URL generated from XI webservice creation wizard. http://server:50000/XISOAPAdapter/MessageServlet?channel=:BS_B2B_ECOMMERCE_PORTAL:CC_SOAP_SND&version=3.0&Se

  • Help for a beginner in utl_file

    Hi, As I said I have just begun to learn pl/sql and looks like I am having a big trouble with it. I will attach the code I started with I know it does not do much and useful but can someone please help me run it? When I try to run it it gives the com

  • Session in Jasper Report

    Hi All, I'm currently using Jasper Reports for report generation. I'm currently facing problem in retrieving session objects while generating the report. I'm trying to Print a report by exporting it to pdf format. In the jrxml, i include a Sub report

  • Nokia E90 firmware battery problem

    Hi! I updated last week my E90 to the latest firmware. Until then, my battery lasted for more than 3 days. Now, my battery lasts for only 18-20 hours when I do not make any phone call. I do not have any bluetooth or WI-FI scanner activated. I do not