I want to make use of the new api function such as strings, threads, longs etc...I'm struggling to convert the class file to cap file when I include Strings in my code, the converter gives me errors: "unsupported String type constant". When I remove the String, then the converter converts it to a cap file without errors. Is there something extra I need to do to convert .class to .cap to use the connected api?
Using: JavaCard302 and jdk1.6u11
wrote a bat file that does my compiling and converting:
echo off
set appName=testCrypt
set targetdir=C:\SC\%appName%\%appName%
rmdir /S /Q %targetdir%
..\JDK1.6\bin\javac.exe -g -d %appName% -classpath ".;%JC_HOME%\lib\api_connected.jar" %appName%.java
..\JavaCard302\bin\converter.bat -i -applet 0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x08:0x09:0x00:0x00 %appName%.%appName% -classdir %appName% -exportpath %JC_HOME%\api_export_files %appName% 0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x08:0x09:0x00 1.0
Javacard only support below keywords,It is only a subset of Java。 abstract default if private this boolean do implements protected throw break else import public throws byte extends instanceof return try case final int short void catch finally interface static while class for new super switch continue goto package