Java 17+ support
When you say "it does not work" can you be more specific? I've just checked and with Java 17.0.2 (from OpenJDK) I can load GATE Developer, load the ANNIE application and process a document without issue. Now I've not checked every plugin but it would seem that in general it works, so if you could provide any further details of the problems you are having that would be great and we can look at fixing them,
Mark
Hi,
I would like to know whether there is any plan or work in progress to support java 17 or higher. We are currently using java 11 in the project where GATE is used but tried against java 17 and it does not work.
Thanks and regards
On Wednesday, October 5, 2022, <javier.soley@...> wrote:
Hi,
I would like to know whether there is any plan or work in progress to support java 17 or higher. We are currently using java 11 in the project where GATE is used but tried against java 17 and it does not work.
Thanks and regards
I have debugged the issue and the error is thrown when trying to load a custom GATE plugin we developed. If we build our app with jdk 17, when loading our plugin we get the error: java.lang.IllegalArgumentException: Unsupported class file major version 61. The exception comes from gate.util.asm.ClassReader. I've seen that asm supports jdk 17 starting at 9.1 version so given GATE latest version uses gate-asm-9.0 library my guess is that this needs to be upgraded.
Thanks, that makes sense. I've just quickly checked locally and I can upgrade to ASM 9.4 and GATE still seems to work correctly, so that does seem to be the most sensible route. I'll have a look at getting that through the release process shortly (would mean that the latest snapshot of GATE would then start using the new ASM version) although I guess if you could set the compiler source/target version to use JDK 16 when building your plugin it might work as well (assuming you aren't using any JDK 17 language features).
Thanks for the bug report and I'll post again once there is any progress,
Mark
Sorry for not being more specific, I had the impression it was a more general problem.
I have debugged the issue and the error is thrown when trying to load a custom GATE plugin we developed. If we build our app with jdk 17, when loading our plugin we get the error: java.lang.IllegalArgumentException: Unsupported class file major version 61. The exception comes from gate.util.asm.ClassReader. I've seen that asm supports jdk 17 starting at 9.1 version so given GATE latest version uses gate-asm-9.0 library my guess is that this needs to be upgraded.
I've now done a new release of gate-asm which shades version 9.4 of the official distribution so, in theory, will support up to Java 20.
You can grab the latest snapshot build of GATE which uses this new version from https://jenkins.gate.ac.uk/job/gate-core/
Hope that helps,
Mark
Thanks, that makes sense. I've just quickly checked locally and I can upgrade to ASM 9.4 and GATE still seems to work correctly, so that does seem to be the most sensible route. I'll have a look at getting that through the release process shortly (would mean that the latest snapshot of GATE would then start using the new ASM version) although I guess if you could set the compiler source/target version to use JDK 16 when building your plugin it might work as well (assuming you aren't using any JDK 17 language features).
Thanks for the bug report and I'll post again once there is any progress,
Mark
On 06/10/2022 11:13, javier.soley@... wrote:
Sorry for not being more specific, I had the impression it was a more general problem.
I have debugged the issue and the error is thrown when trying to load a custom GATE plugin we developed. If we build our app with jdk 17, when loading our plugin we get the error: java.lang.IllegalArgumentException: Unsupported class file major version 61. The exception comes from gate.util.asm.ClassReader. I've seen that asm supports jdk 17 starting at 9.1 version so given GATE latest version uses gate-asm-9.0 library my guess is that this needs to be upgraded.
Thanks Mark.
I have just verified that our custom GATE plugin works with Java 17 using the latest snapshot.
Javier