Preface

This document describes how to use the development kit for the Java Card 3 Platform, Connected Edition, Version 3.0.2, to develop applet applications, web applications, servlets, and extended applets. The Java Card 3 Platform currently includes Versions 3.0, 3.0.1, and 3.0.2 of Java Card technology.

The Connected Edition architecture uses a new virtual machine and a substantially different runtime environment from that of the classic platform (an update of the Java Card technology released in the 2.2.2 release). Java Card technology for the Connected Edition targets devices that are less resource-constrained than previous Java Card technology devices. The Connected Edition includes new network-oriented features, such as support for web applications, including the Java Servlet APIs, and support for applets with extended and advanced capabilities.

Note - The Java Card 3 platform development kit is released in both binary and source bundles. Some bundles include cryptography extensions. Portions of this document are targeted toward specific release bundles and are identified as such throughout this book.

Refer to the Runtime Environment Specification, Java Card Platform, Version 3.0.1, Connected Edition and Programming Notes, Java Card 3 Platform, Connected Edition for additional information about creating extended applets. You must download the Java Card specifications bundle and the Programming Notes book separately from the Sun Microsystems web site at:

`http://java.sun.com/javacard`

Apache Ant (Ant) tasks in the development kit are required to install and run the development kit tools from the command line. The NetBeans IDE, Version 6.8 or higher, is required to run the samples and is suggested as your development environment.

##

Who Should Use This Document

The Development Kit User’s Guide, Java Card 3 Platform, Version 3.0.2, Connected Edition is written for developers who are:

- Creating Java Card 3 web and servlet applications or extended applet applications for the Connected Edition.

- Creating classic applet applications for the Classic or Connected Editions.

- Creating a vendor-specific framework based on the specifications for the Connected Edition.

##

Before You Read This Document

Before reading this guide, you should become familiar with the Java programming language, object-oriented programming, the specifications for the Connected Edition, and smart card technology. A good resource for becoming familiar with Java and Java Card technology is the Java Developer Connection web site located at `http://java.sun.com`.

##

How This Book Is Organized

The guide is divided into two parts. The Part I describes how to set up the development kit, how to use the samples, and how to use the development kit tools. Part II describes various programming issues for the Java Card 3 platform.

P A R T I - Setup, Samples and Tools

Chapter 1, provides an overview of the development kit for the Connected Edition.

Chapter 2 describes the procedures for installing the tools required for this release.

Chapter 3 provides a brief description of the steps involved in Java Card application development.

Chapter 4 describes where to find the entire set of samples designed for the Java Card 3 platform, with further details for the set of samples included in this development kit. To run the samples, the NetBeans IDE, Version 6.8, is required.

Chapter 5 describes the reference implementation of the Connected Edition and provides the procedures used to start it.

Chapter 6 describes how to compile source files outside of an IDE by using the Compiler tool included with the development kit.

Chapter 7 describes how to use the Packager tool to create and validate a Java Card technology-based application module.

Chapter 8 describes how to use the Installer tool to perform card management tasks.

Chapter 9 describes how to use the tools provided by the development kit to modify classic applets to run on the Java Card 3 platform.

Chapter 10 describes the APDU tool and how it is used when installing and running applets on a smart card.

Chapter 11 describes how to install and to use the Debugger tool in Java Card 3 platform applications development.

P A R T II - Programming With the Development Kit

Chapter 12 describes the options used to configure the RI, including how to generate and install SSL keys.

Chapter 13 describes how developers can modify or add to source files of the RI including VM code, and all tools (such as the Packager and Installer) and build a customized Java Card 3 platform RI according to their specific requirements.

Chapter 14 describes the APDU I/O API, which is a library used by development kit components, such as `apdutool`.

Appendix A describes the application module and library formats supported by the Java Card 3 platform card manager.

Glossary describes key terms used in this document.

##

Related Documents

References to various documents or products are made in this manual. Have the following documents available:

- Application Programming Interface, Java Card Platform, Version 3.0.1,Connected Edition

- Runtime Environment Specification, Java Card Platform, Version 3.0.1, Connected Edition

- Virtual Machine Specification, Java Card Platform, Version 3.0.1, Connected Edition

- Application Programming Notes, Java Card Platform, Version 3.0.1, Connected Edition

- ISO 7816 Specification Parts 1-6

- Java Card Platform, Version 3.0, White Paper

- Java Card Technology for Smart Cards: Architecture and Programmer’s Guide by Zhiqun Chen (Addison-Wesley, 2000)

- Java Servlet Specification, Java Card Platform, Version 3.0.1, Connected Edition

- Off-Card Verifier, Java Card 2.2.2, White Paper

- The Java Programming Language (Java Series), Fourth Edition by James Gosling, Ken Arnold, and David Holmes (Addison-Wesley, 2005)

- The Java Virtual Machine Specification (Java Series), Second Edition by Tim Lindholm and Frank Yellin (Addison-Wesley, 1999)

##

Specifications, Standards, Protocols and Technologies

The Connected Edition supports the following specifications, standards, protocols, and technologies:

- ETSI SCP and UICC specification for 3G mobile phones.

- ISO 7816-4:1995 Identification cards - Integrated circuit cards with contacts part 4, inter-industry commands for interchange.

These specifications describe the communication transport and application protocol layer between the terminal and the card.

- ISO 7816-4:2004 Identification cards - Integrated circuit cards with contacts part 4, inter-industry commands for interchange.

- EMV 2000 Integrated Circuit Card specifications for payment systems.

These standards enable the correct operation and interoperability of payment applications on terminals and smart cards.

- GlobalPlatform card specification

These card specifications are built on top of the Java Card specifications to provide interoperable content and lifecycle management for multifunction payment cards.

##

Typographic Conventions

Typeface | Meaning | Examples
--- | --- | ---
    AaBbCc123
| The names of commands, files, and directories; on-screen computer output | Edit your `.login` file. Use `ls -a` to list all files. `% You have mail`.
`AaBbCc123` | What you type, when contrasted with on-screen computer output Procedural steps | `%` `su`
    Password:
1. Run c`j` `cre` in a new window.
AaBbCc123 | Book titles, new words or terms, words to be emphasized Command-line variable; replace with a real name or value | Read Chapter 6 in the User’s Guide. These are called class options. You must be superuser to do this. To delete a file, type `rm` filename.

##

Accessing Documentation Online

The Java Developer Connection program web site enables you to access Java platform technical documentation on the web at

`http://java.sun.com/reference/docs`

##

Third-Party Web Sites

Sun is not responsible for the availability of third-party web sites mentioned in this document. Sun does not endorse and is not responsible or liable for any content, advertising, products, or other materials that are available on or through such sites or resources. Sun will not be responsible or liable for any actual or alleged damage or loss caused by or in connection with the use of or reliance on any such content, goods, or services that are available on or through such sites or resources.

##

Sun Welcomes Your Comments

We are interested in improving our documentation and welcome your comments and suggestions. You can submit your comments about this document to the following address:

`jc3-ri-feedback@sun.com`

Please include the following title of this document with your feedback:

Development Kit User’s Guide, Java Card 3 Platform, Version 3.0.2, Connected Edition

Copyright © 2009 Sun Microsystems, Inc. All rights reserved.