aboutsummaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
Diffstat (limited to 'setup')
-rw-r--r--setup/java-test/README.txt2
-rw-r--r--setup/java-test/Test.java7
-rw-r--r--setup/java-test/test.jarbin829 -> 887 bytes
3 files changed, 7 insertions, 2 deletions
diff --git a/setup/java-test/README.txt b/setup/java-test/README.txt
index 95dbfcc24..b8ca72a7a 100644
--- a/setup/java-test/README.txt
+++ b/setup/java-test/README.txt
@@ -1,4 +1,4 @@
Create Java version test:
-javac -target 5 -source 5 Test.java
+javac -target 6 -source 6 Test.java
jar cfe test.jar Test Test.class
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);
}
}
diff --git a/setup/java-test/test.jar b/setup/java-test/test.jar
index 3afb7e312..f0484f274 100644
--- a/setup/java-test/test.jar
+++ b/setup/java-test/test.jar
Binary files differ