Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2018-03-20 16:34:41 +0000
committerStephan Herrmann2018-03-20 16:34:41 +0000
commit5adc74b748b392cafdfffb997322e61281a14672 (patch)
tree9d0a17f69d4f5d37d874bacad4694c4c0bec6665
parentbbee27085f3788f003d4f455c0a475745c27ca71 (diff)
downloadeclipse.jdt.core-5adc74b748b392cafdfffb997322e61281a14672.tar.gz
eclipse.jdt.core-5adc74b748b392cafdfffb997322e61281a14672.tar.xz
eclipse.jdt.core-5adc74b748b392cafdfffb997322e61281a14672.zip
Bug 532670 - [10] cannot launch jvm 10 from compiler tests
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/LocalVMLauncher.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/LocalVMLauncher.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/LocalVMLauncher.java
index 484c911236..363e6cd1bd 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/LocalVMLauncher.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/LocalVMLauncher.java
@@ -15,6 +15,7 @@ package org.eclipse.jdt.core.tests.runtime;
import java.io.*;
import java.util.*;
+import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.tests.util.Util;
/**
@@ -71,7 +72,7 @@ public static LocalVMLauncher getLauncher() {
return new MacVMLauncher();
}
String javaVersion = System.getProperty("java.version");
- boolean isJrt = javaVersion != null && javaVersion.length() > 0 && javaVersion.charAt(0) == '9';
+ boolean isJrt = javaVersion != null && javaVersion.length() > 0 && JavaCore.compareJavaVersions(javaVersion, "9") >= 0;
File file = new File(Util.getJREDirectory() + (isJrt ? "/lib/jrt-fs.jar" : "/lib/rt.jar"));
if (file.exists()) {
return new StandardVMLauncher();

Back to the top