[Bug] 使用双击启动 HMCL 比使用 java -jar / 终端启动慢
Open
Nobody has claimed this yet.
bug
- Dominant language
- Java
- Stars
- 10.1k
- Forks
- 934
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 82
Description
问题描述 | Bug Description
在我的设备上,使用双击启动 HMCL 要比使用 java -jar / 终端启动慢 3~5 秒
应该不是发行版问题 , 在我的设备上,Eclipse Adoptium 21、Bellsoft Liberica 17、Graalvm 25 均可复现
修改 HMCLauncher 源码为使用 java 即可缓解本问题,但是会导致出来一个终端
启动器崩溃报告 / 启动器日志文件 | Launcher Crash Report / Launcher Log File
双击 exe 启动
[11:31:46] [@.Launcher.main/INFO] *** HMCL 3.11.SNAPSHOT ***
[11:31:46] [@.Launcher.main/INFO] Operating System: Windows 11 26H1 10.0.28020.1371
[11:31:46] [@.Launcher.main/INFO] Processor Identifier: Intel64 Family 6 Model 183 Stepping 1, GenuineIntel
[11:31:46] [@.Launcher.main/INFO] System Architecture: x86-64
[11:31:46] [@.Launcher.main/INFO] Native Encoding: UTF-8
[11:31:46] [@.Launcher.main/INFO] JNU Encoding: UTF-8
[11:31:46] [@.Launcher.main/INFO] Code Page: 65001
[11:31:46] [@.Launcher.main/INFO] Java Architecture: x86-64
[11:31:46] [@.Launcher.main/INFO] Java Version: 17.0.16, BellSoft
[11:31:46] [@.Launcher.main/INFO] Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), BellSoft
[11:31:46] [@.Launcher.main/INFO] Java Home: C:\Program Files\BellSoft\LibericaJDK-17-Full
[11:31:46] [@.Launcher.main/INFO] Current Directory: E:\HMCLddddd\HMCL\build\libs
[11:31:46] [@.Launcher.main/INFO] HMCL Global Directory: C:\Users\admin\AppData\Roaming\.hmcl
[11:31:46] [@.Launcher.main/INFO] HMCL Current Directory: E:\HMCLddddd\HMCL\build\libs\.hmcl
[11:31:46] [@.Launcher.main/INFO] HMCL Jar Path: E:\HMCLddddd\HMCL\build\libs\HMCL-3.11.SNAPSHOT.exe
[11:31:46] [@.Launcher.main/INFO] HMCL Log File: E:\HMCLddddd\HMCL\build\libs\.hmcl\logs\2026-01-24T11-31-46.log
[11:31:46] [@.Launcher.main/INFO] JVM Max Memory: 8128 MiB
[11:31:46] [@.Launcher.main/INFO] Metaspace: 4.59 MiB
[11:31:46] [@.Launcher.main/INFO] Native Backend: JNA
[11:31:46] [@.util.platform.SystemInfo.initialize/INFO] System Info:
- CPU: Intel Core i9-13900HX (24 Cores / 32 Threads)
- GPU 1: GameViewer Graphics
- GPU 2: Intel RaptorLake-S Mobile Graphics Controller [Integrated]
- GPU 3: NVIDIA GeForce RTX 4060 Laptop [Discrete]
- Memory: 27.87 GiB / 31.75 GiB (87%)
Setting PULSE_DURATION to 240 hz
[11:31:47] [@.Launcher.start/INFO] JavaFX Version: 17.0.16+1+b01
[11:31:47] [@.Launcher.start/INFO] Prism Pipeline: com.sun.prism.d3d.D3DPipeline
[11:31:47] [@.Launcher.start/INFO] Dark Mode: false
[11:31:47] [@.Launcher.start/INFO] Reduced Motion: false
[11:31:47] [@.Launcher.start/INFO] Screens:
- Screen 1: 2561x1601 @ 1.5x 126dpi in 16" (0, 0, 1707, 1067)
[11:31:47] [@.setting.ConfigHolder.init/INFO] Config location: E:\HMCLddddd\HMCL\build\libs\.hmcl\hmcl.json
[11:31:47] [@.task.AsyncTaskExecutor.lambda$executeNormalTask$0/TRACE] Executing task: org.jackhuang.hmcl.game.GameRepository.refreshVersionsAsync(GameRepository.java:91)
[11:31:47] [@.task.AsyncTaskExecutor.lambda$executeNormalTask$0/TRACE] Executing task: org.jackhuang.hmcl.game.GameRepository.refreshVersionsAsync(GameRepository.java:91)
[11:31:47] [@.event.EventBus.fireEvent/INFO] RefreshingVersionsEvent [source=HMCLGameRepository [versions=null, baseDirectory=.minecraft]] gets fired
[11:31:47] [@.event.EventBus.fireEvent/INFO] RefreshingVersionsEvent [source=HMCLGameRepository [versions=null, baseDirectory=.minecraft]] gets fired
[11:31:47] [@.event.EventBus.fireEvent/INFO] RefreshedVersionsEvent [source=HMCLGameRepository [versions=[], baseDirectory=.minecraft]] gets fired
[11:31:47] [@.event.EventBus.fireEvent/INFO] RefreshedVersionsEvent [source=HMCLGameRepository [versions=[], baseDirectory=.minecraft]] gets fired
[11:31:47] [@.task.AsyncTaskExecutor.lambda$executeNormalTask$12/TRACE] Task finished: org.jackhuang.hmcl.game.GameRepository.refreshVersionsAsync(GameRepository.java:91)
[11:31:47] [@.task.AsyncTaskExecutor.lambda$executeNormalTask$12/TRACE] Task finished: org.jackhuang.hmcl.game.GameRepository.refreshVersionsAsync(GameRepository.java:91)
[11:31:47] [@.ui.Controllers.initialize/INFO] Start initializing application
[11:31:47] [@.ui.Controllers.initialize/INFO] Disable sub-pixel antialiasing
[11:31:48] [@.setting.FontManager.<clinit>/INFO] Font: MiSans Medium
[11:31:48] [@.auth.authlibinjector.AuthlibInjectorServer.refreshMetadata/INFO] authlib-injector server metadata refreshed: https://littleskin.cn/api/yggdrasil/
[11:31:49] [@.java.JavaManager.searchPotentialJavaExecutables/TRACE] Finished Java lookup, found 20
- JDK 1.8.0_432 (x86-64, Unknown): C:\Users\admin\.jdks\corretto-1.8.0_432\bin\java.exe
- JRE 1.8.0_461 (x86-64, Unknown): C:\Program Files\Java\jre1.8.0_461\bin\java.exe
- JDK 1.8.0_462 (x86-64, Unknown): C:\Program Files\BellSoft\LibericaJDK-8-Full\bin\java.exe
- JDK 1.8.0_462 (x86-64, Azul Systems, Inc.): C:\Program Files\Zulu\zulu-8\bin\java.exe
- JDK 11.0.28 (x86-64, BellSoft): C:\Program Files\BellSoft\LibericaJDK-11-Full\bin\java.exe
- JDK 17.0.14 (x86-64, Eclipse Adoptium): C:\Program Files\Eclipse Adoptium\jdk-17.0.14.7-hotspot\bin\java.exe
- JDK 17.0.16 (x86-64, BellSoft): C:\Program Files\BellSoft\LibericaJDK-17-Full\bin\java.exe
- JDK 21.0.6 (x86-64, Eclipse Adoptium): C:\Program Files\Eclipse Adoptium\jdk-21.0.6.7-hotspot\bin\java.exe
- JDK 21.0.7 (x86-64, Microsoft): C:\Program Files\Microsoft\jdk-21.0.7.6-hotspot\bin\java.exe
- JDK 21.0.7 (x86-64, Oracle Corporation): C:\Users\admin\.jdks\graalvm-jdk-21.0.7\bin\java.exe
- JDK 21.0.7 (x86-64, Microsoft): C:\Users\admin\.jdks\ms-21.0.7\bin\java.exe
- JDK 21.0.8 (x86-64, BellSoft): C:\Program Files\BellSoft\LibericaJDK-21-Full\bin\java.exe
- JDK 21.0.8 (x86-64, JetBrains s.r.o.): C:\Program Files\JetBrains\jbr_jcef-21.0.8-windows-x64-b1038.68\bin\java.exe
- JDK 22.0.2 (x86-64, Oracle Corporation): C:\Users\admin\.jdks\openjdk-22.0.2\bin\java.exe
- JDK 23.0.1 (x86-64, Azul Systems, Inc.): C:\Program Files\Zulu\zulu-23\bin\java.exe
- JDK 23.0.2 (x86-64, BellSoft): D:\Program Files\BellSoft\LibericaJDK-23-Full\bin\java.exe
- JDK 25 (x86-64, BellSoft): C:\Program Files\BellSoft\LibericaJDK-25-Full\bin\java.exe
- JDK 25 (x86-64, Oracle Corporation): C:\Users\admin\.jdks\graalvm-jdk-25\bin\java.exe
- JDK 25.0.1 (x86-64, JetBrains s.r.o.): C:\Users\admin\.jdks\jbrsdk_jcef-25.0.1\bin\java.exe
- JDK 25.0.1 (x86-64, Microsoft): C:\Users\admin\.jdks\ms-25.0.1\bin\java.exe
java -jar 启动
[11:38:18] [@.Launcher.main/INFO] *** HMCL 3.11.SNAPSHOT ***
[11:38:18] [@.Launcher.main/INFO] Operating System: Windows 11 26H1 10.0.28020.1371
[11:38:18] [@.Launcher.main/INFO] Processor Identifier: Intel64 Family 6 Model 183 Stepping 1, GenuineIntel
[11:38:18] [@.Launcher.main/INFO] System Architecture: x86-64
[11:38:18] [@.Launcher.main/INFO] Native Encoding: UTF-8
[11:38:18] [@.Launcher.main/INFO] JNU Encoding: UTF-8
[11:38:18] [@.Launcher.main/INFO] Code Page: 65001
[11:38:18] [@.Launcher.main/INFO] Java Architecture: x86-64
[11:38:18] [@.Launcher.main/INFO] Java Version: 17.0.16, BellSoft
[11:38:18] [@.Launcher.main/INFO] Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), BellSoft
[11:38:18] [@.Launcher.main/INFO] Java Home: C:\Program Files\BellSoft\LibericaJDK-17-Full
[11:38:18] [@.Launcher.main/INFO] Current Directory: E:\HMCLddddd\HMCL\build\libs
[11:38:18] [@.Launcher.main/INFO] HMCL Global Directory: C:\Users\admin\AppData\Roaming\.hmcl
[11:38:18] [@.Launcher.main/INFO] HMCL Current Directory: E:\HMCLddddd\HMCL\build\libs\.hmcl
[11:38:18] [@.Launcher.main/INFO] HMCL Jar Path: E:\HMCLddddd\HMCL\build\libs\HMCL-3.11.SNAPSHOT.exe
[11:38:18] [@.Launcher.main/INFO] HMCL Log File: E:\HMCLddddd\HMCL\build\libs\.hmcl\logs\2026-01-24T11-38-18.log
[11:38:18] [@.Launcher.main/INFO] JVM Max Memory: 8128 MiB
[11:38:18] [@.Launcher.main/INFO] Metaspace: 4.59 MiB
[11:38:18] [@.Launcher.main/INFO] Native Backend: JNA
[11:38:18] [@.util.platform.SystemInfo.initialize/INFO] System Info:
- CPU: Intel Core i9-13900HX (24 Cores / 32 Threads)
- GPU 1: GameViewer Graphics
- GPU 2: Intel RaptorLake-S Mobile Graphics Controller [Integrated]
- GPU 3: NVIDIA GeForce RTX 4060 Laptop [Discrete]
- Memory: 22.85 GiB / 31.75 GiB (71%)
[11:38:18] [@.Launcher.start/INFO] JavaFX Version: 17.0.16+1+b01
[11:38:18] [@.Launcher.start/INFO] Prism Pipeline: com.sun.prism.d3d.D3DPipeline
[11:38:18] [@.Launcher.start/INFO] Dark Mode: false
[11:38:18] [@.Launcher.start/INFO] Reduced Motion: false
[11:38:18] [@.Launcher.start/INFO] Screens:
- Screen 1: 2561x1601 @ 1.5x 126dpi in 16" (0, 0, 1707, 1067)
[11:38:18] [@.setting.ConfigHolder.init/INFO] Config location: E:\HMCLddddd\HMCL\build\libs\.hmcl\hmcl.json
[11:38:18] [@.task.AsyncTaskExecutor.lambda$executeNormalTask$0/TRACE] Executing task: org.jackhuang.hmcl.game.GameRepository.refreshVersionsAsync(GameRepository.java:91)
[11:38:18] [@.task.AsyncTaskExecutor.lambda$executeNormalTask$0/TRACE] Executing task: org.jackhuang.hmcl.game.GameRepository.refreshVersionsAsync(GameRepository.java:91)
[11:38:18] [@.event.EventBus.fireEvent/INFO] RefreshingVersionsEvent [source=HMCLGameRepository [versions=null, baseDirectory=.minecraft]] gets fired
[11:38:18] [@.event.EventBus.fireEvent/INFO] RefreshingVersionsEvent [source=HMCLGameRepository [versions=null, baseDirectory=.minecraft]] gets fired
[11:38:18] [@.event.EventBus.fireEvent/INFO] RefreshedVersionsEvent [source=HMCLGameRepository [versions=[], baseDirectory=.minecraft]] gets fired
[11:38:18] [@.event.EventBus.fireEvent/INFO] RefreshedVersionsEvent [source=HMCLGameRepository [versions=[], baseDirectory=.minecraft]] gets fired
[11:38:18] [@.task.AsyncTaskExecutor.lambda$executeNormalTask$12/TRACE] Task finished: org.jackhuang.hmcl.game.GameRepository.refreshVersionsAsync(GameRepository.java:91)
[11:38:18] [@.task.AsyncTaskExecutor.lambda$executeNormalTask$12/TRACE] Task finished: org.jackhuang.hmcl.game.GameRepository.refreshVersionsAsync(GameRepository.java:91)
[11:38:18] [@.ui.Controllers.initialize/INFO] Start initializing application
[11:38:18] [@.ui.Controllers.initialize/INFO] Disable sub-pixel antialiasing
[11:38:18] [@.auth.authlibinjector.AuthlibInjectorServer.refreshMetadata/INFO] authlib-injector server metadata refreshed: https://littleskin.cn/api/yggdrasil/
[11:38:18] [@.setting.FontManager.<clinit>/INFO] Font: System
[11:38:19] [@.java.JavaManager.searchPotentialJavaExecutables/TRACE] Finished Java lookup, found 20
- JDK 1.8.0_432 (x86-64, Unknown): C:\Users\admin\.jdks\corretto-1.8.0_432\bin\java.exe
- JRE 1.8.0_461 (x86-64, Unknown): C:\Program Files\Java\jre1.8.0_461\bin\java.exe
- JDK 1.8.0_462 (x86-64, Unknown): C:\Program Files\BellSoft\LibericaJDK-8-Full\bin\java.exe
- JDK 1.8.0_462 (x86-64, Azul Systems, Inc.): C:\Program Files\Zulu\zulu-8\bin\java.exe
- JDK 11.0.28 (x86-64, BellSoft): C:\Program Files\BellSoft\LibericaJDK-11-Full\bin\java.exe
- JDK 17.0.14 (x86-64, Eclipse Adoptium): C:\Program Files\Eclipse Adoptium\jdk-17.0.14.7-hotspot\bin\java.exe
- JDK 17.0.16 (x86-64, BellSoft): C:\Program Files\BellSoft\LibericaJDK-17-Full\bin\java.exe
- JDK 21.0.6 (x86-64, Eclipse Adoptium): C:\Program Files\Eclipse Adoptium\jdk-21.0.6.7-hotspot\bin\java.exe
- JDK 21.0.7 (x86-64, Microsoft): C:\Program Files\Microsoft\jdk-21.0.7.6-hotspot\bin\java.exe
- JDK 21.0.7 (x86-64, Oracle Corporation): C:\Users\admin\.jdks\graalvm-jdk-21.0.7\bin\java.exe
- JDK 21.0.7 (x86-64, Microsoft): C:\Users\admin\.jdks\ms-21.0.7\bin\java.exe
- JDK 21.0.8 (x86-64, BellSoft): C:\Program Files\BellSoft\LibericaJDK-21-Full\bin\java.exe
- JDK 21.0.8 (x86-64, JetBrains s.r.o.): C:\Program Files\JetBrains\jbr_jcef-21.0.8-windows-x64-b1038.68\bin\java.exe
- JDK 22.0.2 (x86-64, Oracle Corporation): C:\Users\admin\.jdks\openjdk-22.0.2\bin\java.exe
- JDK 23.0.1 (x86-64, Azul Systems, Inc.): C:\Program Files\Zulu\zulu-23\bin\java.exe
- JDK 23.0.2 (x86-64, BellSoft): D:\Program Files\BellSoft\LibericaJDK-23-Full\bin\java.exe
- JDK 25 (x86-64, BellSoft): C:\Program Files\BellSoft\LibericaJDK-25-Full\bin\java.exe
- JDK 25 (x86-64, Oracle Corporation): C:\Users\admin\.jdks\graalvm-jdk-25\bin\java.exe
- JDK 25.0.1 (x86-64, JetBrains s.r.o.): C:\Users\admin\.jdks\jbrsdk_jcef-25.0.1\bin\java.exe
- JDK 25.0.1 (x86-64, Microsoft): C:\Users\admin\.jdks\ms-25.0.1\bin\java.exe
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the HMCLauncher source and compare the double-click executable path with java -jar, using the Launcher.main startup logs and JavaManager.searchPotentialJavaExecutables timing as reference points. Identify where the extra 3–5 seconds occurs and preserve the no-terminal behavior while making double-click startup comparable to terminal startup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- desktop, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100