Build a javacard Development Environment

Source: Internet
Author: User

Step 1 installSDKPreparations:

 

1. InstallJdk-1_5_0_22-windows-i586-p.exe,:

Http://download.csdn.net/detail/sonylogin/3646422

To avoid errors, install the SDK directly in c: \ jdk1.5.0 _ 22.

 

2. InstallationEclipse.

 

3. Install the plug-inJcdk,:

Http://download.csdn.net/detail/hubi0952/3450766

(1). decompressCom. IBM. bluez. jcop. eclipse_3.1.1. BCopy a folderEclipseOfPluginsDirectory.

(2). If you startEclipseAfterCom. IBM. bluez. jcop. eclipse_3.1.1. BThe plug-in is not loaded. Please turn it offEclipse, EnterEclipseOfConfigurationDirectory, delete. SettingsFolder andConfig. iniRestart all files outside the configuration fileEclipseYou can.

(3).Cracking:

SetCom. IBM. bluez. jcop. Eclipse. prefsCopyEclipseWorking directoryWorkspaceUnder. Metadata \. plugins \ org. Eclipse. Core. runtime \. SettingsDirectory..

 

4.DownloadJava_card_kit-2_2_2-windows, web site:

Http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javame-419430.html#java_card_kit-2.2.2-oth-JPR

 

5. Environment configuration, my computer advanced, Environment configuration, create the following environment variables.

(1) java_home:

C: \ jdk1.5.0 _ 22

(2) jc_ant_task_home:

E: \ Android \ java_card_kit-2_2_2-windows \ java_card_kit-2_2_2 \ ant-tasks;

(3) jc_home:

E: \ Android \ javacard-cap \ java_card_kit-2_2_2

(4) classpath:

.; % Java_home % \ Lib \ DT. jar; % java_home % \ Lib \ tools. jar; % jc_ant_task_home % \ Lib \ jctasks. Jar

 

Reprint please indicate from: http://blog.csdn.net/menghnhhuan/article/details/7616690

 

Step 2 create a project:

1.InEclipseCreate a project on, selectJava Card Project.

2.Create on the project just createdJava card Applet, InputAid...Complete as prompted, Engineering example.

Step 3 compile the project generation. Class:

1.CreateCompile. bat, The content is as follows:

[HTML] View plaincopyprint?

    1. Rem Java source code
    2. SetJava_source_root=. \ SRC
    3. Rem compile all the files in the path of % java_source_root % \ Mifare \ example
    4. % Java_home % \ bin \ javac-g-source 1.3-target 1.1-classpath % jc_home % \ Lib \ API. Jar % java_source_root % \ Mifare \ example \ *. Java
    5. Pause

2.RunCompile. batGenerate. ClassFile, stored in% Java_source_root % \ Mifare \ exampleDirectory.

Step 4: generate. CapFile:

You have generated. ClassFile generated based on this file. CapFile

1.Create a fileHelloworld. Opt, The content is as follows:

[HTML] View plaincopyprint?

    1. -Out exp JCA cap
    2. -Exportpath E: \ Android \ javacard-cap \ java_card_kit-2_2_2 \ api_export_files
    3. -Classdir E: \ Android \ javacard-cap \ SRC
    4. -Applet 0xad: 0xad: 0xad: 0xad: 0xad: 0xad
    5. Mifare. example. mifareexample
    6. Mifare. Example
    7. 0xad: 0xad: 0xad: 0xad: 0xad: 0x01 1.0

Note:

E: \ Android \ javacard-cap \ java_card_kit-2_2_2 \ api_export_files:JckOfExpPath

E: \ Android \ javacard-cap \ SRC:. ClassPath

0xad: 0xad: 0xad: 0xad: 0xad:AppletOfAid

Mifare. example. mifareexample:AppletClass Name

Mifare. Example:AppletPackage name

(For details, referDocuments in jdk-1_5_0_22-windows-i586-p.exe .)

2.InDoSGoConverter. batDirectoryE: \ Android \ javacard-cap \ java_card_kit-2_2 _2 \ bin

RunHelloworld. Opt, Run the following command:Converter-config E: \ Android \ javacard-cap \ helloworld. Opt

Generated. CapPut files in. Class

 

Step 5EclipseDebugging

Right-clickApplet, SelectRun as/run ipvs, SelectMifareexample, Appears:

IfCard ReaderSelectJaca card simulation,Then selectPackage uploadTag, runRun, AppearsJcop ShellDebugging interface.

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.