Results 1 to 6 of 6

Thread: Load Applet to Java card

  1. #1
    Join Date
    Apr 2010
    Posts
    77

    Load Applet to Java card

    I would like to know the steps to simulate an applet Java Card ( JCWDE and APDUTOOL ) in Eclipse , under Windows XP. The constraints imposed by the Smart (the size of the JVM and the runtime system should not exceed 16 kb ) were forced to establish a system requiring the least possible memory resource . Any idea? Please update. Thanks in advance.

  2. #2
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Load Applet to Java card

    Applets are loaded into the card through a CAP file . This file is generated in two steps . First, the Java classes are compiled in a conventional manner (with javac. The only difference being the use of Java Card API and not the Java standard ) to files . class. Then , a conversion tool (converter), provided by the JavaCard Development Kit , includes all classes of the same package in a single file CAP . It also makes a number of checks on the code ( check the size of integers manipulated by example) and the linking between the classes .

  3. #3
    Join Date
    May 2008
    Posts
    2,297

    Re: Load Applet to Java card

    We will resume the application developed in the first part of TP , but this time, we will perform the compilation step by hand. Get the source file MonApplet.java and place it in a new directory (eg ~ / ELECINF359/upload/monpackage) . The compilation is done using the following command :

    Code:
    javac ELECINF359/upload MyPackage / MonApplet.java - classpath ~ / ELECINF359/jc211/bin/api21.jar -source 1.3- target 1

  4. #4
    Join Date
    May 2008
    Posts
    2,389

    Re: Load Applet to Java card

    Parameter classpath tells the compiler to take into account the JavaCard API ( and not the API standard Java SE) , and parameters source and target tell the compiler to generate bytecode compatible with Java Virtual Machine version 1.3 ( so we can not use the latest Java such as generics ) because the virtual machine from the card does not support newer versions.

  5. #5
    Join Date
    Oct 2005
    Posts
    2,393

    Re: Load Applet to Java card

    You need to use the tool converter provided by the SDK to generate the JavaCard CAP file from the class we just compile. To be sure the environment , re - export the environment variables of the first part of TP (in practice , the command converter is a script that starts the execution of a class using Java virtual machine , it is necessary that it be properly configured).

    Code:
    ~ / ELECINF359/upload $ export JAVA_HOME = / usr
    ~ / $ export ELECINF359/upload JC_HOME = ~ / ELECINF359/java_card_kit-2_2_2
    ~ / ELECINF359/upload $ export PATH = $ PATH : $ JC_HOME / bin

  6. #6
    Join Date
    Feb 2010
    Posts
    701

    Re: Load Applet to Java card

    Mails We will modify the code of the client application written in the first part to it now communicates with the card and not with the simulator. Good news , recent releases of Java virtual machines natively integrate everything needed to communicate with a Card Reader ( provided he has a driver is PC / SC ) and a map. The source code of the client application amended Maclasse2.java. Compile ( in Eclipse for example ) the class and test the communication with the card.

Similar Threads

  1. Simulate Java Card Applet
    By Rily in forum Software Development
    Replies: 7
    Last Post: 26-10-2010, 01:44 PM
  2. Zoom in on a Java Applet?
    By Bharata in forum Software Development
    Replies: 6
    Last Post: 21-10-2010, 07:01 AM
  3. How to load/install Java Card in the JAR form
    By Namuchi in forum Software Development
    Replies: 5
    Last Post: 20-07-2010, 02:56 AM
  4. Load an Applet from a Jar
    By TechGate in forum Software Development
    Replies: 5
    Last Post: 25-02-2010, 02:31 AM
  5. Applet unable to load -shows with the Grey Box
    By Shanbaag in forum Software Development
    Replies: 3
    Last Post: 15-04-2009, 12:25 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,727,302,785.11737 seconds with 17 queries