mirror of
https://github.com/corda/corda.git
synced 2024-12-19 04:57:58 +00:00
Change checkJavaVersion() startup check to support JDK 11.
This commit is contained in:
parent
ac56f302eb
commit
2a2fb6f82a
@ -173,8 +173,8 @@ public class CordaCaplet extends Capsule {
|
||||
|
||||
private static void checkJavaVersion() {
|
||||
String version = System.getProperty("java.version");
|
||||
if (version == null || !version.startsWith("1.8")) {
|
||||
System.err.printf("Error: Unsupported Java version %s; currently only version 1.8 is supported.\n", version);
|
||||
if (version == null || Arrays.asList("1.8", "11").stream().noneMatch(version::startsWith)) {
|
||||
System.err.printf("Error: Unsupported Java version %s; currently only version 1.8 or 11 is supported.\n", version);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user