From b8a7b489cc3a45b8655ccbb3a16ff07b9429fd89 Mon Sep 17 00:00:00 2001 From: huangyuhui Date: Fri, 10 Feb 2017 22:06:46 +0800 Subject: [PATCH] Now the person who are using OpenJDK will be warned. --- .../java/org/jackhuang/hellominecraft/launcher/Main.java | 5 +++++ .../resources/org/jackhuang/hellominecraft/lang/I18N.lang | 1 + .../org/jackhuang/hellominecraft/lang/I18N.properties | 1 + .../resources/org/jackhuang/hellominecraft/lang/I18N_vi.lang | 1 + .../org/jackhuang/hellominecraft/lang/I18N_vi.properties | 1 + .../resources/org/jackhuang/hellominecraft/lang/I18N_zh.lang | 1 + .../org/jackhuang/hellominecraft/lang/I18N_zh.properties | 1 + .../org/jackhuang/hellominecraft/lang/I18N_zh_CN.lang | 1 + .../org/jackhuang/hellominecraft/lang/I18N_zh_CN.properties | 1 + 9 files changed, 13 insertions(+) diff --git a/HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/Main.java b/HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/Main.java index 6af914721..d0c4bd4e2 100644 --- a/HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/Main.java +++ b/HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/Main.java @@ -51,6 +51,7 @@ import org.jackhuang.hellominecraft.util.ui.MyRepaintManager; import org.jackhuang.hellominecraft.launcher.util.DefaultPlugin; import org.jackhuang.hellominecraft.lookandfeel.HelloMinecraftLookAndFeel; import org.jackhuang.hellominecraft.util.MathUtils; +import org.jackhuang.hellominecraft.util.MessageBox; import org.jackhuang.hellominecraft.util.StrUtils; import org.jackhuang.hellominecraft.util.lang.SupportedLocales; import org.jackhuang.hellominecraft.util.VersionNumber; @@ -142,6 +143,10 @@ public final class Main implements Runnable { SupportedLocales.NOW_LOCALE = sl; Locale.setDefault(sl.self); } + + if (System.getProperty("java.vm.name").contains("Open")) { // OpenJDK + MessageBox.showLocalized("ui.message.open_jdk"); + } try { LOOK_AND_FEEL = new HelloMinecraftLookAndFeel(Settings.getInstance().getTheme().settings); diff --git a/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N.lang b/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N.lang index 0ad6ed310..e263e45f0 100755 --- a/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N.lang +++ b/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N.lang @@ -170,6 +170,7 @@ ui.message.launching=Launching... ui.message.making=Generating... ui.message.sure_remove=Sure to remove profile %s? ui.message.update_java=Please upgrade your Java. +ui.message.open_jdk=We have found that you started this application using OpenJDK, which will cause so many troubles drawing the UI. We suggest you using Oracle JDK instead. ui.label.settings=Settings ui.label.crashing=Hello Minecraft! Launcher has crashed! diff --git a/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N.properties b/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N.properties index 0ad6ed310..e263e45f0 100755 --- a/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N.properties +++ b/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N.properties @@ -170,6 +170,7 @@ ui.message.launching=Launching... ui.message.making=Generating... ui.message.sure_remove=Sure to remove profile %s? ui.message.update_java=Please upgrade your Java. +ui.message.open_jdk=We have found that you started this application using OpenJDK, which will cause so many troubles drawing the UI. We suggest you using Oracle JDK instead. ui.label.settings=Settings ui.label.crashing=Hello Minecraft! Launcher has crashed! diff --git a/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_vi.lang b/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_vi.lang index 1ad102ddb..43c2ffa2f 100644 --- a/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_vi.lang +++ b/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_vi.lang @@ -173,6 +173,7 @@ ui.label.settings=Cài đặt ui.label.crashing=HMCL Minecraft Launcher đã bị crash! ui.label.crashing_out_dated=HL Minecraft Launcher đã bị crash! Và launcher của bạn không phải là phiên bản mới nhất. cập nhật nó đi! ui.label.failed_set=Failed to set: +ui.message.open_jdk=We have found that you started this application using OpenJDK, which will cause so many troubles drawing the UI. We suggest you using Oracle JDK instead. download=Download download.mojang=Mojang diff --git a/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_vi.properties b/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_vi.properties index e56190d3d..43041db27 100644 --- a/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_vi.properties +++ b/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_vi.properties @@ -173,6 +173,7 @@ ui.label.settings=C\u00e0i \u0111\u1eb7t ui.label.crashing=HMCL Minecraft Launcher \u0111\u00e3 b\u1ecb crash! ui.label.crashing_out_dated=HL Minecraft Launcher \u0111\u00e3 b\u1ecb crash! V\u00e0 launcher c\u1ee7a b\u1ea1n kh\u00f4ng ph\u1ea3i l\u00e0 phi\u00ean b\u1ea3n m\u1edbi nh\u1ea5t. c\u1eadp nh\u1eadt n\u00f3 \u0111i! ui.label.failed_set=Failed to set: +ui.message.open_jdk=We have found that you started this application using OpenJDK, which will cause so many troubles drawing the UI. We suggest you using Oracle JDK instead. download=Download download.mojang=Mojang diff --git a/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_zh.lang b/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_zh.lang index f25563014..75a071bda 100755 --- a/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_zh.lang +++ b/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_zh.lang @@ -175,6 +175,7 @@ ui.label.settings=選項 ui.label.crashing=Hello Minecraft! Launcher遇到了無法處理的錯誤,請複制下列內容並通過mcbbs、貼吧或Minecraft Forum反饋bug。 ui.label.crashing_out_dated=Hello Minecraft! Launcher遇到了無法處理的錯誤,已檢測到您的啟動器不是最新版本,請更新後再試! ui.label.failed_set=設定失敗: +ui.message.open_jdk=我們發現您正在使用OpenJDK,這會導致很多介面問題,我們建議您更換Oracle JDK。 download=下載 download.mojang=官方 diff --git a/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_zh.properties b/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_zh.properties index 0c15c3bf2..a34cba4b5 100755 --- a/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_zh.properties +++ b/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_zh.properties @@ -175,6 +175,7 @@ ui.label.settings=\u9078\u9805 ui.label.crashing=Hello Minecraft! Launcher\u9047\u5230\u4e86\u7121\u6cd5\u8655\u7406\u7684\u932f\u8aa4\uff0c\u8acb\u8907\u5236\u4e0b\u5217\u5167\u5bb9\u4e26\u901a\u904emcbbs\u3001\u8cbc\u5427\u6216Minecraft Forum\u53cd\u994bbug\u3002 ui.label.crashing_out_dated=Hello Minecraft! Launcher\u9047\u5230\u4e86\u7121\u6cd5\u8655\u7406\u7684\u932f\u8aa4\uff0c\u5df2\u6aa2\u6e2c\u5230\u60a8\u7684\u555f\u52d5\u5668\u4e0d\u662f\u6700\u65b0\u7248\u672c\uff0c\u8acb\u66f4\u65b0\u5f8c\u518d\u8a66\uff01 ui.label.failed_set=\u8a2d\u5b9a\u5931\u6557\uff1a +ui.message.open_jdk=\u6211\u5011\u767c\u73fe\u60a8\u6b63\u5728\u4f7f\u7528OpenJDK\uff0c\u9019\u6703\u5c0e\u81f4\u5f88\u591a\u4ecb\u9762\u554f\u984c\uff0c\u6211\u5011\u5efa\u8b70\u60a8\u66f4\u63dbOracle JDK\u3002 download=\u4e0b\u8f09 download.mojang=\u5b98\u65b9 diff --git a/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_zh_CN.lang b/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_zh_CN.lang index b0ca61fc1..c91376319 100755 --- a/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_zh_CN.lang +++ b/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_zh_CN.lang @@ -175,6 +175,7 @@ ui.label.settings=选项 ui.label.crashing=Hello Minecraft!遇到了无法处理的错误,请复制下列内容并通过mcbbs、贴吧、Github或Minecraft Forum反馈bug。 ui.label.crashing_out_dated=Hello Minecraft! Launcher遇到了无法处理的错误,已检测到您的启动器不是最新版本,请更新后再试! ui.label.failed_set=设置失败: +ui.message.open_jdk=我们发现您正在使用OpenJDK,这会导致很多界面问题,我们建议您更换Oracle JDK。 download=下载 download.mojang=官方 diff --git a/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_zh_CN.properties b/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_zh_CN.properties index db409d584..2dae5867f 100755 --- a/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_zh_CN.properties +++ b/HMCUtils/src/main/resources/org/jackhuang/hellominecraft/lang/I18N_zh_CN.properties @@ -175,6 +175,7 @@ ui.label.settings=\u9009\u9879 ui.label.crashing=Hello Minecraft!\u9047\u5230\u4e86\u65e0\u6cd5\u5904\u7406\u7684\u9519\u8bef\uff0c\u8bf7\u590d\u5236\u4e0b\u5217\u5185\u5bb9\u5e76\u901a\u8fc7mcbbs\u3001\u8d34\u5427\u3001Github\u6216Minecraft Forum\u53cd\u9988bug\u3002 ui.label.crashing_out_dated=Hello Minecraft! Launcher\u9047\u5230\u4e86\u65e0\u6cd5\u5904\u7406\u7684\u9519\u8bef\uff0c\u5df2\u68c0\u6d4b\u5230\u60a8\u7684\u542f\u52a8\u5668\u4e0d\u662f\u6700\u65b0\u7248\u672c\uff0c\u8bf7\u66f4\u65b0\u540e\u518d\u8bd5\uff01 ui.label.failed_set=\u8bbe\u7f6e\u5931\u8d25\uff1a +ui.message.open_jdk=\u6211\u4eec\u53d1\u73b0\u60a8\u6b63\u5728\u4f7f\u7528OpenJDK\uff0c\u8fd9\u4f1a\u5bfc\u81f4\u5f88\u591a\u754c\u9762\u95ee\u9898\uff0c\u6211\u4eec\u5efa\u8bae\u60a8\u66f4\u6362Oracle JDK\u3002 download=\u4e0b\u8f7d download.mojang=\u5b98\u65b9