mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[FIX] Java 7 found crash
This commit is contained in:
parent
04c854703e
commit
7ab7c29fe4
1 changed files with 4 additions and 1 deletions
|
@ -141,7 +141,10 @@ public static JavaVersionAndBuild getJavaVersion(String version) {
|
||||||
JavaVersionAndBuild result = new JavaVersionAndBuild();
|
JavaVersionAndBuild result = new JavaVersionAndBuild();
|
||||||
if (version.startsWith("1.")) {
|
if (version.startsWith("1.")) {
|
||||||
result.version = Integer.parseInt(version.substring(2, 3));
|
result.version = Integer.parseInt(version.substring(2, 3));
|
||||||
result.build = Integer.parseInt(version.substring(version.indexOf('_') + 1));
|
int pos = version.indexOf('_');
|
||||||
|
if (pos != -1) {
|
||||||
|
result.build = Integer.parseInt(version.substring(pos + 1));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
int dot = version.indexOf(".");
|
int dot = version.indexOf(".");
|
||||||
if (dot != -1) {
|
if (dot != -1) {
|
||||||
|
|
Loading…
Reference in a new issue