Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
public:smartcard:javacardcompilation [2011-12-19 18:37] – [JavaCard applet development with NetBeans IDE] petrs | public:research:smartcard:javacardcompilation [2015-02-16 21:00] – petrs |
---|
(c) 2010-2011 by LaBAK FI MUNI (contact us at http://www.fi.muni.cz/research/laboratories/labak/) | (c) 2010-2011 by LaBAK FI MUNI (contact us at http://www.fi.muni.cz/research/laboratories/labak/) |
| |
{{:public:smartcard:scripttemplates.zip|Download script templates}} for common smart cards. | {{scripttemplates.zip|Download script templates}} for common smart cards. |
| |
{{:public:smarthelloworld.zip|Download example project}} with standard Sun Java Card Hello World example with all configurations applied. | {{:public:smarthelloworld.zip|Download example project}} with standard Sun Java Card Hello World example with all configurations applied. |
| |
[[https://minotaur.fi.muni.cz:8443/~xsmolka/EurOpen_Tutorial/EU2011.zip | Download fully prepared Ubuntu VirtualBox image]] with preconfigured toolchain (1.3GB). Preconfigured JOpenPGPCard applet (PGP/GPG), CardEdge applet (PKCS#11, PKCS#15, ISO/IEC 7816-15), AlgTest (testing supported algorithms) and CesTa framework also included. | [[https://fi.muni.cz/~xsvenda/EU2011.zip | Download fully prepared Ubuntu VirtualBox image]] with preconfigured toolchain (1.3GB). Preconfigured JOpenPGPCard applet (PGP/GPG), CardEdge applet (PKCS#11, PKCS#15, ISO/IEC 7816-15), AlgTest (testing supported algorithms) and CesTa framework also included. |
| |
{{:public:smartcard:JavaCard_tutorial_2011.pdf | Download slides with JavaCard tutorial.}} To be used with Ubuntu VirtualBox image. | {{JavaCard_tutorial_2011.pdf | Download slides with JavaCard tutorial.}} To be used with Ubuntu VirtualBox image. |
| |
| [[https://www.youtube.com/watch?v=khgT5dwKvOo | Oracle JavaCard tutorial (2013)]] |
| |
===== Installation process ===== | ===== Installation process ===== |
- Set configuration parameters in "nbproject/project.properties" (file in your project directory) | - Set configuration parameters in "nbproject/project.properties" (file in your project directory) |
* jc.home - path to Java Card Development Kit | * jc.home - path to Java Card Development Kit |
* jc.export_files - path to Java Card export files (for verifier), usually ${jc.home}\\api_export_files | * jc.export_files - path to Java Card export files (for verifier), usually ${jc.home}\\api_export_files (NOTE: JC SDK 2.1.2 has this folder named api21_export_files) |
* gpshell.home - path to GPShell | * gpshell.home - path to GPShell |
* gpshell.cmd - path to GPShell executable | * gpshell.cmd - path to GPShell executable |
* When compilation is done (compiled files are in build/classes/), task "convert" is executed and performs conversion and verification. Converted file can be found in build\classes\com\sun\javacard\samples\HelloWorld\javacard. This action can be configured in task "convert" in build.xml. | * When compilation is done (compiled files are in build/classes/), task "convert" is executed and performs conversion and verification. Converted file can be found in build\classes\com\sun\javacard\samples\HelloWorld\javacard. This action can be configured in task "convert" in build.xml. |
* Testing executes script "scripts/helloInstallGP211_JCOP41_cap.txt" in GPShell and tries to install HelloWorld on compatible Java Card. This action can be configured in task "run-script" in build.xml. | * Testing executes script "scripts/helloInstallGP211_JCOP41_cap.txt" in GPShell and tries to install HelloWorld on compatible Java Card. This action can be configured in task "run-script" in build.xml. |
| |
| ===== Troubleshooting ===== |
| |
| * Problem: Compilation fails with error: cannot find symbol XY (e.g., symbol: variable KeyAgreement) |
| * Correct JavaCard SDK was not added to libraries. |
| * If you get error for all JavaCard classes, then add library for your target card (e.g., 2.2.1) |
| * if you get this error only for few classes (but not all), then you are using JC SDK without supprt for this classes (e.g., KeyAgreement, Checksum, MEMORY_TYPE_PERSISTENT... are not present in 2.1.2, but are present in 2.2.1) |
| |
| * Problem: Convert fails with: Error: Could not find or load main class com.sun.javacard.converter.Converter |
| * Compilation was successful, but Converter was not found. Check if your //jc.home// path is correctly set in nbproject\project.properties file. Note that you must use double \ in path (e.g., d:\\Apps\\JavaCardSDK2.2.2) |
| |