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
CAP files are only for classic applets. Connected applets are servlets packaged in JAR files.
JavaCard classic edition supports a very limited subset of Java. In particular Strings are not supported. This is why the CAP converter is rejecting your code.
To my knowledge, the connected edition is a dead technology. No smart-card product supports it.
The reason is that It was developed to support big SIM cards with lots of memory and high bandwidth interfaces (USB, MMC) but these never took up. Today's SIM cards or Secure Elements are still very limited devices.