JAVA Card Application Development Create the first applet

Source: Internet
Author: User

This article describes how to create a Java card project in the eclipse Environment, creating a new applet to run on a Java card.


You must install the environment at the moment of setup: Download an eclipse first and then install JCOP. (JCOP download, you need to sign an agreement with NXP to get the installation files, of course, the Internet may find other versions, not discussed here). Installation order: Install Eclipse, install JCOP, and then import the JCOP authorization file. You can also refer to this article:

Environment Construction: http://blog.csdn.net/menghnhhuan/article/details/7616690

I am currently using the Eclipse Version:kepler servicerelease 2

Establishment of the project:

1. Create a new Java Card project:


2. After selecting "Java Card project", fill in Project name to get:


3. Click Next, the next page is configured as follows, only need to tick two, as for different versions of the differences, I do not know for a while.


4. After clicking Next, the next page is configured as follows:


5. Click Next to fill in the package and class name on the next page. (package requires all lowercase, class name must be all uppercase)


6. Click Next to fill in the package and applet's aid.


7. Click Finish to see the project:


8. The generated code is as follows:


At this point, eclipse will automatically compile the code without prompting any errors to indicate that the code has been compiled.

9. The compilation is complete, you can start debugging, the Debug tool uses IBM's JCOP (now authorized to NXP), the boot method is as follows:


Click on this green bug and select Debug configurations.

10. At "Java Card application", right-click, New, Get:


11. Click Apply, then click Debug, and you will be able to debug happily.


This time, the code will be loaded into the simulator, you can send instructions to try our Hello world.

Send/send 00a4040006a00000000901 instructions, you can see the response of the simulator, you can set breakpoints to debug.


Note the points:

1. If there is a prompt error, consider whether the compiler version of the problem: progect– "properties-" Java complier; (the Java compiler version I currently chose is 1.6)

2. When debugging, a new simulator is required;

3. Only need new once, run the simulator once, if run more, need to go to debug window close, otherwise it will run multiple emulators simultaneously.


This article is just about a process, in fact everyone in the operation will encounter a variety of problems.

such as the installation of JCOP problems, such as the establishment of the project to the final prompt error, such as debugging instructions do not know how to send.

Only slowly to grope, one another.




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.