diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/setting/DownloadProviders.java b/HMCL/src/main/java/org/jackhuang/hmcl/setting/DownloadProviders.java index f7e3ade1d..e4a2fc303 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/setting/DownloadProviders.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/setting/DownloadProviders.java @@ -26,6 +26,7 @@ import org.jackhuang.hmcl.util.StringUtils; import org.jackhuang.hmcl.util.i18n.I18n; import org.jackhuang.hmcl.util.io.ResponseCodeException; +import javax.net.ssl.SSLHandshakeException; import java.io.FileNotFoundException; import java.net.SocketTimeoutException; import java.net.URL; @@ -156,6 +157,8 @@ public final class DownloadProviders { return i18n("install.failed.downloading.detail", url) + "\n" + i18n("exception.access_denied", ((AccessDeniedException) exception.getCause()).getFile()); } else if (exception.getCause() instanceof ArtifactMalformedException) { return i18n("install.failed.downloading.detail", url) + "\n" + i18n("exception.artifact_malformed"); + } else if (exception.getCause() instanceof SSLHandshakeException) { + return i18n("install.failed.downloading.detail", url) + "\n" + i18n("exception.ssl_handshake"); } else { return i18n("install.failed.downloading.detail", url) + "\n" + StringUtils.getStackTrace(exception.getCause()); } diff --git a/HMCL/src/main/resources/assets/lang/I18N.properties b/HMCL/src/main/resources/assets/lang/I18N.properties index 228d97214..8b09c4380 100644 --- a/HMCL/src/main/resources/assets/lang/I18N.properties +++ b/HMCL/src/main/resources/assets/lang/I18N.properties @@ -293,6 +293,7 @@ exception.access_denied=It's denied by operating system to access file %s. Maybe Please check if current operating system user has permission to access that file.\n\ For Windows users, you can also try the Resource Monitor, find if some programs is holding the file, try to close related program, or restart your computer. exception.artifact_malformed=The file cannot pass verification. +exception.ssl_handshake=Cannot establish SSL connection because of missing SSL certifcate in current Java installation. Try to start HMCL on another Java VM. extension.bat=Windows Bat file extension.mod=Mod file diff --git a/HMCL/src/main/resources/assets/lang/I18N_zh.properties b/HMCL/src/main/resources/assets/lang/I18N_zh.properties index d5cfcab9c..bdf427761 100644 --- a/HMCL/src/main/resources/assets/lang/I18N_zh.properties +++ b/HMCL/src/main/resources/assets/lang/I18N_zh.properties @@ -293,6 +293,7 @@ exception.access_denied=因為無法訪問文件 %s,HMCL 沒有對該文件的 請你檢查當前操作系統帳戶是否能訪問該文件,比如非管理員用戶可能不能訪問其他帳戶的個人文件夾內的文件。\n\ 對於 Windows 用戶,你還可以嘗試通過資源監視器查看是否有程序占用了該文件,如果是,你可以關閉占用此文件相關程序,或者重啟電腦再試。 exception.artifact_malformed=下載的文件正確,無法通過校驗。 +exception.ssl_handshake=無法建立 SSL 連接,因為當前 Java 虛擬機缺少相關的 SSL 證書。你可以嘗試使用其他的 Java 虛擬機啟動 HMCL 再試。 extension.bat=Windows 指令碼 extension.mod=模組檔案 diff --git a/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties b/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties index 54b4a6d5b..9af47a277 100644 --- a/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties +++ b/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties @@ -293,6 +293,7 @@ exception.access_denied=因为无法访问文件 %s,HMCL 没有对该文件的 请你检查当前操作系统帐户是否能访问该文件,比如非管理员用户可能不能访问其他帐户的个人文件夹内的文件。\n\ 对于 Windows 用户,你还可以尝试通过资源监视器查看是否有程序占用了该文件,如果是,你可以关闭占用此文件相关程序,或者重启电脑再试。 exception.artifact_malformed=下载的文件正确,无法通过校验。 +exception.ssl_handshake=无法建立 SSL 连接,因为当前 Java 虚拟机缺少相关的 SSL 证书。你可以尝试使用其他的 Java 虚拟机启动 HMCL 再试。 extension.bat=Windows 脚本 extension.mod=模组文件