6

I am developing an applet with JavaCard 3.0.4 version.

I have downloaded and installed SDK with Oracle installer (http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javame-419430.html#java_card_kit-classic-3_0_4-rr-bin-do)

And I found only *.bat (converter.bat and etc.) and there is no linux scripts.

But version 2.2.1 and 2.2.2 have versions for Linux.

Any thoughts?

3 Answers 3

13

Yes there is. Just extract it on Windows and use under Linux. Or you can get the necessary files from here:

https://github.com/martinpaljak/oracle_javacard_sdks

Building applets on Linux is simple as well:

https://github.com/martinpaljak/ant-javacard

5
  • Thank you for answer. What if I want use converter in Linux (github.com/martinpaljak/oracle_javacard_sdks/blob/master/…) where is sh script?
    – raiym
    Mar 5, 2016 at 16:32
  • Of course I can write it by myself but it will be convenient have it out of the box, like before with previous realises (2.*)
    – raiym
    Mar 5, 2016 at 16:33
  • 1
    The JAR files with necessary content is there, just need to use it. Have a try with ant-javacard, I tried to get rid of most of the annoyances of simple applet building and make something small and simple that JustWorks(tm). Only requirement is ANT and most systems have it. Mar 6, 2016 at 7:46
  • I will take a look at it on Wednesday. Thank you
    – raiym
    Mar 7, 2016 at 19:48
  • 1
    msitools can be used to extract *.msi files on Linux.
    – Ayell
    May 24, 2017 at 23:23
3

No, there aren't any official releases for Linux anymore to my knowledge. Neither are the Ant commands supported anymore. I wish there were, but they seem to have been sunk. You might want to nicely ask your vendor, as the manufacturers have direct influence in the Java Card Forum. In the end the Java Card SDK is an Oracle product though, so they have the final say.

Note that all functionality is contained as platform independent within JAR files, and that the Java Card API runtime itself doesn't depend on the host platform either. It is therefore perfectly possible to create ant files and / or shell scripts based on the batch files delivered by the Java Card SDK. Look for more info at the answer of Martin Paljak.

1
  • 1
    The answer was and has been correct up to this date. However, the SDK does leave the door open to easily port the Windows based distribution, so I changed my answer to reflect that. Dec 11, 2018 at 13:51
0

I can provide this simple wrapper script (add it to the bin directory of the Java Card SDK as _starter.sh and make it executable):

#!/bin/bash

export JC_CLASSIC_HOME="$(dirname "$0")/../"

for l in "$JC_CLASSIC_HOME/lib"/*.jar ; do
    JC_CLASSPATH="$l:$JC_CLASSPATH"
done

MAIN="$1"
shift 1
java "-Djc.home=$JC_CLASSIC_HOME" -classpath "$JC_CLASSPATH" "$MAIN" "$@"

Then you can create individual launcher scripts utilizing this wrapper in the same directory:

capdump.sh:

#!/bin/bash

"$(dirname "$0")/_starter.sh" com.sun.javacard.capdump.CapDump "$@" 

capgen.sh:

#!/bin/bash

"$(dirname "$0")/_starter.sh" com.sun.javacard.jcasm.cap.Main "$@" 

converter.sh:

#!/bin/bash

"$(dirname "$0")/_starter.sh" com.sun.javacard.converter.Main "$@" 

exp2text.sh:

#!/bin/bash

"$(dirname "$0")/_starter.sh" com.sun.javacard.converter.Exp2Text "$@" 

verifycap.sh:

#!/bin/bash

"$(dirname "$0")/_starter.sh" com.sun.javacard.offcardverifier.Verifier "$@" 

verifyexp.sh:

#!/bin/bash

"$(dirname "$0")/_starter.sh" com.sun.javacard.offcardverifier.VerifyExp "$@" 

verifyrev.sh:

#!/bin/bash

"$(dirname "$0")/_starter.sh" com.sun.javacard.offcardverifier.VerifyRev "$@" 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.