aboutsummaryrefslogtreecommitdiff
path: root/setup/java-test/Test.java
diff options
context:
space:
mode:
Diffstat (limited to 'setup/java-test/Test.java')
-rw-r--r--setup/java-test/Test.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/setup/java-test/Test.java b/setup/java-test/Test.java
index 363d6953e..7d1b3972d 100644
--- a/setup/java-test/Test.java
+++ b/setup/java-test/Test.java
@@ -1,5 +1,10 @@
public class Test {
public static void main(String[] a) {
- System.exit(Integer.parseInt(System.getProperty("java.version").split("\\.")[1]) >= 7 ? 0 : 1);
+ String[] versions = System.getProperty("java.version").split("\\.");
+ int major = Integer.parseInt(versions[0]);
+ if (major == 1) {
+ major = Integer.parseInt(versions[1]);
+ }
+ System.exit(major >= 7 ? 0 : 1);
}
}