Open ken4ward opened 1 year ago
Hello, it seems that it can't resolve JavaCard Development Kit functions. These should have been downloaded by running the git submodule --init --update command.
If you look into 'build.xml' file, it adds dependency 'sdks/jc304something' which actually contain definitions for all symbols you can't resolve.
I have my mobile phone right now with me so I will be able to provide more help in couple of days. But until then, try to somehow ensure, this sdks/jc304 is properly included during the build.
What command did you run when these errors occured?
If you haven't ran any commands, maybe it's just IntelliJ Idea's problem and you should somehow add the jc304.jar file yourself to the dependency list managed by IntelliJ.
Thanks a lot for the prompt response. I have not run any command yet. I was just browsing though the code files. This is my first time checking out a JavaCard code. So everything is still a grey area to me. I'll update you accordingly as I progress.
Thank you. I have executed the first command, though it didn't resolve the issue. I tried the second command ant -f ./build.xml
, and got this error. I suspect it's because the first command has not resolved the SDK dependencies.
Buildfile: /IdeaProjects/JavaCards/Electronic_passports_and_citizen_ID/InfinitEID/src/InfinitEID-applet/build.xml
[cap] INFO: using JavaCard 3.0.4 SDK in /IdeaProjects/JavaCards/Electronic_passports_and_citizen_ID/InfinitEID/src/InfinitEID-applet/sdks/jc304_kit
[cap] INFO: Setting package name to InfinitEID
[cap] Building CAP with 1 applet from package InfinitEID (AID: 0102030405)
[cap] InfinitEID.InfinitEIDApplet 0102030405060708
[compile] Compiling files from /IdeaProjects/JavaCards/Electronic_passports_and_citizen_ID/InfinitEID/src/InfinitEID-applet/src/InfinitEID
[compile] Compiling 1 source file to /var/folders/31/dlm5j_nn5958m8kyyhjcqd580000gn/T/jccpro11731244854021782265
[compile] IdeaProjects/JavaCards/Electronic_passports_and_citizen_ID/InfinitEID/src/InfinitEID-applet/src/InfinitEID/InfinitEIDApplet.java
[compile] error: Source option 6 is no longer supported. Use 7 or later.
[compile] error: Target option 6 is no longer supported. Use 7 or later.
BUILD FAILED
/IdeaProjects/JavaCards/Electronic_passports_and_citizen_ID/InfinitEID/src/InfinitEID-applet/build.xml:4: Compile failed; see the compiler error output for details.
It is seeing the classes but not the called methods. It has 19 of such methods to resolve. This is an example.
Seems like you are using newer version of either Ant or Maven. Try googling "error: Source option 6 is no longer supported. Use 7 or later.", this is your main problem here I think. As I said, I can't be much help until I get to computer.
You're definitely right. I'm using the latest of both libraries. I'll be very grateful if you could support when on your computer. Your project is quite an interesting one.
I will get to it in couple of days if that's ok.
That's perfectly fine.
Ok so I tried it myself and it seems like the problem is with JAVA_HOME environment variable -> it needs to point to a directory with Java 8 (maybe some other versions are possible as well, but Java 8 is tested).
So I recommend to install Java 8 version and use that, until I figure out, how to make this work with latest Java.
The dependency for Java 8 comes from ant-javacard.jar
file. From https://github.com/martinpaljak/ant-javacard#download--use:
Java version usable with all SDK-s is 1.8! Use SDK 3.0.5u3 and
targetsdk
to compile with Java 11 for older versions.
Since this project is using SDK 3.0.4, the only usable Java version is 1.8 (otherwise known as Java 8).
https://github.com/martinpaljak/ant-javacard/wiki/JavaCard-SDK-and-JDK-version-compatibility
This is definitive source I can give you. According to this, it should also work with Java 11 as well.
I am trying to run your code and kept getting these errors
Cannot resolve symbol 'ALG_EC_FP'
To the best of my knowledge, I think I have followed the README.md appropriately. Could you help direct me to what needs to be done.