HMCL-dev / HMCL-dev/HMCL

[Feature] 将最低 Java 版本提升至 Java 25

Open
#5,718 6 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
10.1k
Forks
934
Avg merge
1d 5h
Merged PRs (30d)
82

Description

概述 | Summary

在未来,要求使用 Java 25 运行 HMCL

对于运行游戏使用的 Java 版本不受此影响

原因 | Reason
优势

从 Glavo 在 https://github.com/HMCL-dev/HMCL/issues/5120#issuecomment-3795339978 的表态来看,升级到 Java 25 显然能带来一些新气象。

既然有大量发行版的 JDK 25 仍然支持 Windows 7,那么我们可以考虑在未来(当然至少要等 Minecraft 26.1 普及后)将 HMCL 迁移至 Java 25。能够自由使用 FFM 的话对于我们来说有很大的帮助。

目前 26.1 的官方名称已经定调:Tiny Takeover (中文 Minecraft Wiki 译为「小鬼之家」),一两个月内应该能出正式版。

26.1 开始,游戏要求使用 Java 25 才能运行。

现在也许是讨论此事的时机……

需要注意的事 — 32 位 x86 支持
  • 从 Java 21 开始,Windows 32 位 x86 不再受支持,从 Java 24 开始被彻底移除。[JEP 449] [JEP 479]
  • 从 Java 24 开始,其余平台的 32 位 x86 不再受支持,从 Java 25 开始被彻底移除。[JEP 501] [JEP 503]
  • 从 Minecraft 1.20.5 开始,游戏要求使用 Java 21 和 64 位操作系统。[Minecraft Wiki] [中文 Minecraft Wiki]

对于 32 位的支持是需要考虑的事情。但我个人倾向于放弃 32 位。理由如下:

使用 32 位系统的用户应该是极少的了。网上能找到的一些调查数据 (如 Steam),列出的几乎都是 64 位系统。
现代 Minecraft 及模组生态对内存容量的要求更高了,32 位系统的内存限制显然也跟不上这个浪潮了。
而 Mojang 在 1.20.5 也放弃了 32 位系统的支持。

且部分 JDK 发行版不再主动提供 32 位构建了。

  • Azul Zulu 和 Eclipse Temurin 从 Java 21 开始不再提供 32 位构建。
  • Amazon Corretto 从 Java 17 开始不再提供 32 位构建。
  • Microsoft OpenJDK 已不再提供 32 位构建。[Ref]
  • Eclipse Temurin 从 2026 年开始不再提供新的 32 位构建。[Ref]
需要注意的事 — 旧版 Windows 兼容性

https://github.com/HMCL-dev/HMCL/issues/5120 的反馈来看,Windows NT 7600 (7 / Server 2008 R2) 应该还是能打赢复活赛的。
尽管 7600 系列在今年 1 月也接收到了最后一次更新——真的最后一次了。

NT 9200 (8 / Server 2012) 及 NT 9600 (8.1 / Server 2012 R2) 的话,既然 Windows 7 能跑,那它们的问题应该也不大。
可能需要进一步测试,包括早期的 Windows 10 / Server 2016 等。

对于 NT 6000 (Vista / Server 2008)?感觉希望渺茫。
我在测试 https://github.com/HMCL-dev/HMCL/issues/5686 这个问题的时候,在 Vista 上安装了 Oracle Java 8 的一个比较初始的版本 (印象中是 8u51 或者更低) 才能打开 HMCL,新的 BellSoft Liberica JDK 8 已经打不开了。且即便使用这个 Oracle Java 8,问题也不少,尝试进入 HMCL 的一些页面直接崩了;甭提更高的 Java 版本了。

需要注意的事 — 测试旧版 Windows 时

如果诸位有在使用或打算测试上述旧版 Windows 的话,那么建议安装所有能安装的更新,或者使用集成了所有必需更新的映像安装 Windows。
NT 7600 有一个第三方的更新包可以用:UpdatePack7R2

需要注意的事 — 其他操作系统的旧版本

我对其他系统上 Java 主版本的支持情况不是特别熟悉。如果有人需要补充的话,可在下面提出。

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Java-version discussion in issue 5120 and the compatibility concerns listed here, then test HMCL with Java 25 across the mentioned Windows versions and 32-bit versus 64-bit environments. Done means HMCL requires Java 25 while the Java used to run games remains unaffected, with compatibility findings recorded for the relevant platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.