From d06f0e6f8a2469235e63ccebf00e7a1f06ad3236 Mon Sep 17 00:00:00 2001 From: Ghislain Fourny Date: Mon, 28 Oct 2024 11:42:16 +0100 Subject: [PATCH 1/2] Require Java 11. --- src/main/java/org/rumbledb/cli/Main.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/rumbledb/cli/Main.java b/src/main/java/org/rumbledb/cli/Main.java index 436a14dc69..134bc42c4e 100644 --- a/src/main/java/org/rumbledb/cli/Main.java +++ b/src/main/java/org/rumbledb/cli/Main.java @@ -37,12 +37,12 @@ public class Main { public static void main(String[] args) throws IOException { String javaVersion = System.getProperty("java.version"); - if (!javaVersion.startsWith("1.8") && !javaVersion.startsWith("11.")) { - System.err.println("[Error] RumbleDB requires Java 8 or Java 11."); + if (!javaVersion.startsWith("11.")) { + System.err.println("[Error] RumbleDB requires Java 11."); System.err.println("Your Java version: " + System.getProperty("java.version")); - System.err.println("You can download Java 8 or 11 from https://adoptium.net/"); + System.err.println("You can download Java 11 from https://adoptium.net/"); System.err.println( - "If you do have Java 8 or 11, but the wrong version appears above, then it means you need to set your JAVA_HOME environment variable properly to point to Java 8 or 11." + "If you do have Java 11, but the wrong version appears above, then it means you need to set your JAVA_HOME environment variable properly to point to Java 11." ); System.exit(43); } From dc061de30bc54adea382f37a13d9427a63b608c4 Mon Sep 17 00:00:00 2001 From: Ghislain Fourny Date: Mon, 28 Oct 2024 11:44:59 +0100 Subject: [PATCH 2/2] Require 11 or 17. --- src/main/java/org/rumbledb/cli/Main.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/rumbledb/cli/Main.java b/src/main/java/org/rumbledb/cli/Main.java index 134bc42c4e..2a0e84e5ed 100644 --- a/src/main/java/org/rumbledb/cli/Main.java +++ b/src/main/java/org/rumbledb/cli/Main.java @@ -37,12 +37,12 @@ public class Main { public static void main(String[] args) throws IOException { String javaVersion = System.getProperty("java.version"); - if (!javaVersion.startsWith("11.")) { - System.err.println("[Error] RumbleDB requires Java 11."); + if (!javaVersion.startsWith("11.") && !javaVersion.startsWith("17.")) { + System.err.println("[Error] RumbleDB requires Java 11 or 17."); System.err.println("Your Java version: " + System.getProperty("java.version")); - System.err.println("You can download Java 11 from https://adoptium.net/"); + System.err.println("You can download Java 11 or 17 from https://adoptium.net/"); System.err.println( - "If you do have Java 11, but the wrong version appears above, then it means you need to set your JAVA_HOME environment variable properly to point to Java 11." + "If you do have Java 11 or 17, but the wrong version appears above, then it means you need to set your JAVA_HOME environment variable properly to point to Java 11 or 17." ); System.exit(43); }