diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java index b8659a3c..ca23555f 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java @@ -151,6 +151,15 @@ public static JavaVersionAndBuild getJavaVersion(String version) { result.version = Integer.parseInt(version.substring(0, dot)); dot = version.lastIndexOf("."); result.build = Integer.parseInt(version.substring(dot + 1)); + } else { + try { + if(version.endsWith("-ea")) { + version = version.substring(0, version.length()-3); + } + result.version = Integer.parseInt(version); + result.build = 0; + } catch (NumberFormatException ignored) { + } } } return result;