summaryrefslogtreecommitdiffstats
path: root/depends/launcher
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-12-30 14:24:56 +0100
committerPetr Mrázek <peterix@gmail.com>2015-12-30 14:24:56 +0100
commit5f57df81109d268c79b34aac799fc7694ec5882a (patch)
tree2c4a73b64146889ec15db9383cc55e07b8e05cee /depends/launcher
parentb437988d7b06c1e43928f6e285469cb6451c2c85 (diff)
downloadMultiMC-5f57df81109d268c79b34aac799fc7694ec5882a.tar
MultiMC-5f57df81109d268c79b34aac799fc7694ec5882a.tar.gz
MultiMC-5f57df81109d268c79b34aac799fc7694ec5882a.tar.lz
MultiMC-5f57df81109d268c79b34aac799fc7694ec5882a.tar.xz
MultiMC-5f57df81109d268c79b34aac799fc7694ec5882a.zip
GH-1365 Revert "GH-1365 use the first part of the java version number as the major version - native extraction"
This reverts commit b437988d7b06c1e43928f6e285469cb6451c2c85.
Diffstat (limited to 'depends/launcher')
-rw-r--r--depends/launcher/org/multimc/Utils.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/depends/launcher/org/multimc/Utils.java b/depends/launcher/org/multimc/Utils.java
index 67a4b8e8..1077065a 100644
--- a/depends/launcher/org/multimc/Utils.java
+++ b/depends/launcher/org/multimc/Utils.java
@@ -31,9 +31,6 @@ import java.util.Enumeration;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
public class Utils
{
@@ -238,11 +235,8 @@ public class Utils
ZipFile zip = new ZipFile(source);
boolean applyHacks = false;
- // find the first number in the version string, treat that as the major version
- String s = System.getProperty("java.version");
- Matcher matcher = Pattern.compile("\\d+").matcher(s);
- matcher.find();
- int major = Integer.valueOf(matcher.group());
+ String[] javaVersionElements = System.getProperty("java.version").split("\\.");
+ int major = Integer.parseInt(javaVersionElements[1]);
if (major >= 8)
{
applyHacks = true;