Skip to content

Commit

Permalink
Fix #96 and add a note about it into README
Browse files Browse the repository at this point in the history
  • Loading branch information
martinpaljak committed Mar 15, 2024
1 parent 1adb58d commit f1ca1f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ target:
[cap] CAP saved to /Users/martin/projects/ant-javacard/Empty_A000000617008E5CDAAE_50da91a4_2.2.2.cap
```
## Recommended setup
- Targeting JC 3.0.4 or later
- Targeting JC 3.0.4 or later (modern JavaCard-s)
- Use JDK 17 (don't forget to set `$JAVA_HOME`)
- Use JavaCard SDK 3.2.0 (`jckit="sdks/jc320v24.0_kit"`) with right target (`targetsdk="3.x.y"`)
- Targeting JC 2.x.y or 3.0.1
- Targeting JC 2.x.y or 3.0.1 (legacy JavaCard-s)
- Use JDK 8 (don't forget to set `$JAVA_HOME`)
- Use JavaCard SDK 3.0.5u4 (`jckit="sdks/jc305u4_kit"`) with right target (`targetsdk="sdks/jc222_kit"`)

> Note: ant-javacard will continue to support JavaCard 2 for as long as this is achievable with sane effort.
## Syntax
Sample:

Expand Down Expand Up @@ -109,6 +111,7 @@ Details:

Notes:
* `jc.home` property has the highest precedence, followed by `jckit` path of `cap`, followed by path in `javacard`, followed by `JC_HOME` environment variable. SDK must be valid to be considered for use.
* All source files are expected to be UTF-8. It is a sane choice, please use it.

### Output file name variables
* `%h` - 8 character prefix of the SHA-256 Load File Data Block hash of the CAP file
Expand Down
2 changes: 2 additions & 0 deletions task/src/main/java/pro/javacard/ant/JCCap.java
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,8 @@ private void compile() {
// construct javac task
Javac j = new Javac();
j.setProject(project);
// See https://github.com/martinpaljak/ant-javacard/pull/96
j.setEncoding("utf-8");
j.setTaskName("compile");

org.apache.tools.ant.types.Path sources = mkPath(null);
Expand Down

0 comments on commit f1ca1f5

Please sign in to comment.