From d78f767f049c022a0675d339d77520c6b7707bd3 Mon Sep 17 00:00:00 2001 From: Martin Paljak Date: Tue, 15 Oct 2024 11:39:06 +0300 Subject: [PATCH] Reject building with JDK-8 and 3.2.X SDK --- task/src/main/java/pro/javacard/ant/JCCap.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/task/src/main/java/pro/javacard/ant/JCCap.java b/task/src/main/java/pro/javacard/ant/JCCap.java index 564f22a..6576f5c 100644 --- a/task/src/main/java/pro/javacard/ant/JCCap.java +++ b/task/src/main/java/pro/javacard/ant/JCCap.java @@ -445,6 +445,9 @@ private void compile() { } else if (jdkver > 11 && !jckit.getVersion().isOneOf(V310, V320)) { // JDK 17+ minimal class file target is 1.7, but need 1.6 throw new HelpingBuildException(String.format("Can't use JDK %d with JavaCard kit %s (use JDK 11)", jdkver, jckit.getVersion())); + } else if (jdkver == 8 && jckit.getVersion().isOneOf(V320)) { + // 24.1 requires JDK-11 to run (while 24.0 can work with JDK-8, encourage updating) + throw new HelpingBuildException(String.format("Can't use JDK %d with JavaCard kit %s (use JDK 11 or 17)", jdkver, jckit.getVersion())); } j.setTarget(javaVersion);