Java Development Environment
Installation Guide
(V1.9)
Excelsecu Data Technology Co., Ltd.
www.excelsecu.com
CONFIDENTIAL information of Excelsecu Data Technology Co., Ltd.
NO WARRANTIES OF ANY NATURE ARE EXTENDED BY THIS DOCUMENT. Any product and related
material disclosed herein are only furnished pursuant and subject to the terms and conditions of a
duly executed Program Product Licence or Agreement to purchase or lease equipment. The only
warranties made by Excelsecu Technology, if any, with respect to the products described in this
document are set forth in such Licence or Agreement. Excelsecu Technology cannot accept any
financial or other responsibility that may be the result of your use of the information or software
material, including direct, indirect, special or consequential damages.
You should be careful to ensure that the use of this information and/or software material complies
with the laws, rules, and regulations of the jurisdictions with respect to which it is used. All rights
reserved.
Copyright © 2019 Excelsecu Data Technology Co., Ltd.
www.excelsecu.com
Table of Contents
1. Overview ................................................................................................................................... 4
2. Development Environment Installation .................................................................................... 4
2.1. Install JDK 8 ................................................................................................................... 4
2.1.1. Description ........................................................................................................ 4
2.1.2. Download and Install JDK 8 ............................................................................... 4
2.1.3. Set Environment Variables ................................................................................ 6
2.2. Install NetBeans 8.2....................................................................................................... 7
2.2.1. Download NetBeans 8.2 .................................................................................... 7
2.2.2. Download and install Java Card Development Kit (JCDK).................................. 8
2.2.3. Set Environment Variables ................................................................................ 9
2.2.4. Notes ............................................................................................................... 10
3. Build Test Demo ...................................................................................................................... 11
3.1. Build Test Demo .......................................................................................................... 11
3.2. Install Test Demo ......................................................................................................... 18
www.excelsecu.com
1. Overview
This document provides the guidelines in Java Card development environment Installation
and how to compile applets using our Java development platform products.
2. Development Environment Installation
2.1. Install JDK 8
2.1.1. Description
Oracle provides the Java Development Kit (JDK) for Linux, Mac OS X, Solaris, and Windows.
What we need to download the Java SE Development Kit 8 (also named JDK 1.8), which can
be used with NetBeans. The download link is:
https://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-
2177648.html
2.1.2. Download and Install JDK 8
Click the link to download JDK 8 installation package (Java SE Development Kit 8u202 is
recommended to download):
1. Firstly, make sure that what you are going to download is Java SE Development Kit 8u202,
rather than Java SE Runtime Environment 8u202 (JRE is Java Running Environment. If you
just want to run the Java program or Java Applet, download the JRE. If you need to
develop the Java software by yourself, download the JDK. The JDK contains the JRE).
www.excelsecu.com
2. Select the "Accepting License Agreement", and then download the suitable version for
your system. Here takes the Windows x64 as an example.
3. After downloading, click jdk-8u202-windows-x64.exe to install.
4. Install the JDK according to the prompt, and record your installation path of JDK and JRE.
The installation path will be needed when setting the environment variables.
www.excelsecu.com
2.1.3. Set Environment Variables
After the installation is completed, the setting of environment variables is required.
1. New a JAVA_HOME variable and set JAVA_HOME = C:\ProgramFiles\Java\jdk1.8.0_202
according to the installation path.
www.excelsecu.com
2. Edit Path variable and add %JAVA_HOME%\bin to the Path variable.
3. New a CLASSPATH variable and add %JAVA_HOME%\lib\dt.jar
and %JAVA_HOME%\lib\tools.jar to it.
2.2. Install NetBeans 8.2
2.2.1. Download NetBeans 8.2
Download address: https://netbeans.org/downloads/8.2/.
See as the following picture, download the corresponding installation package according to
the development language and requirements.
After downloading, install it according to the prompt.
Note:
It is recommended to download the corresponding installation package in the "All" column
on the rightmost, then you do not need to download and install the JCDK (Java Card
Development Kit) plugin. If you download installation package in other column, you will also
need to download and install JCDK plugin.
www.excelsecu.com
After the installation is completed, the setting of environment variables is required.
2.2.2. Download and install Java Card Development Kit (JCDK)
Open the NetBeans, click “Tools -> Plugins -> Available Plugins”, search “Java Card” in the
“Available Plugins” page, then select “Java Card™” and “Java Card Runtime Bundle” to install.
www.excelsecu.com
2.2.3. Set Environment Variables
After the installation is completed, the setting of environment variables is required.
1. New a JC_HOME variable and set JC_HOME to the JCDK3.0.2_ConnectedEdition folder
directory in the NetBeans installation directory. Example: C:\Program Files\NetBeans
8.2\javacard\JCDK3.0.2_ConnectedEdition
www.excelsecu.com
2. Edit Path variable and add %JC_HOME%\bin to the Path variable.
3. Edit CLASSPATH variable and add %JC_HOME%\lib\api.jar to it.
2.2.4. Notes
1. Before the installation of Netbeans, JDK version1.8 is needed. Installation method see in
2.1 2.1Install JDK 8.
2. NetBeans internally integrated JCDK version 3.0.2. After the installation is finished, you
can begin to develop your own Java Card Applet.
www.excelsecu.com
3. Build Test Demo
Extended packages, which are not included in standard JCAPI, refer to packages that are
extended by vendors or third parties. The extended API interfaces such as display, keypad
controlling, and Bluetooth communication are defined by Excelsecu Company.
3.1. Build Test Demo
1. Open NetBeans, new a project and select Classic Applet Project.
2. Project name and package name: No requirement. Applet AID: 0xE21A7ED8E712.
www.excelsecu.com
3. Package AID: 0xE21A7ED8E711.
4. Import the agent Package. (Skip this step if the product you are using does not
contain an extension API)
1) Right click the project name, choose Properties -> Project Properties ->
www.excelsecu.com
Dependencies -> Add.
2) Add Library -> JAR File
www.excelsecu.com
3) Choose the specialmethod.jar which is provided by Excelsecu Company
www.excelsecu.com
4) Choose “Already on Card”.
5) Add cryptoLib.jar, javacardx.jar provided by our company in the same way shown
above. After all the .jar files are added, you can view them in the project's library
directory, as shown below.
www.excelsecu.com
5. Unzip the specialmethod.jar file provided by Excelsecu Company to obtain the following
files.
Note:
Pay attention to the COM folder architecture.
Copy the whole folder com/es/specialmethod/javacard/specialmethod.exp to
\javacard\JCDK3.0.2_ConnectedEdition\api_export_files under the Netbeans installation
path. Must be copied along with the com/es/specialmethod/javacard folder (In the
specialmethod directory, only the javacard folder is reserved, and do not copy the .class files.)
If Netbeans is installed in the default path, you need to copy the whole folder
com/es/specialmethod/javacard/specialmethod.exp to C:\Program Files\NetBeans
8.2\javacard\JCDK3.0.2_ConnectedEdition\api_export_files. The final path is C:\Program
www.excelsecu.com
Files\NetBeans
8.2\javacard\JCDK3.0.2_ConnectedEdition\api_export_files\com\es\specialmethod\javacar
d\specialmethod.exp
Only the path is compliant to \com\es\specialmethod\javacard\specialmethod.exp as
described above can the EXP file be found and compiled successfully in Netbeans.
6. Add the cryptoLib extension package in the same way as adding the specialmethod
extension package. Unzip the cryptoLib.jar package and copy
com/tmc/cryptoLib/javacard/cryptoLib.exp to the
\javacard\JCDK3.0.2_ConnectedEdition\api_export_files folder in the Netbeans
installation path. The resulting path is
\javacard\JCDK3.0.2_ConnectedEdition\api_export_files\com\tmc\cryptoLib\javaca
rd\cryptoLib.exp
Note: Only the path is compliant to com\tmc\cryptoLib\javacard\cryptoLib.exp as
described above can the EXP file be found and compiled successfully in Netbeans.
7. Build applet and compile it to cap file.
www.excelsecu.com
3.2. Install Test Demo
Refer to the Java Applet Installation Guide to install the cap file into the JavaCard product.
www.excelsecu.com