Open
Conversation
Glavo
reviewed
Feb 24, 2026
| commandline.add("-D" + key + "=" + entry.getValue()); | ||
| } | ||
| } | ||
| commandline.addAll(ManagementFactory.getRuntimeMXBean().getInputArguments()); |
Member
There was a problem hiding this comment.
不要假设 java.management 模块一定存在,HMCL 应当能够在不包含 java.management 模块的 JRE 上工作。
Glavo
reviewed
Feb 24, 2026
| Object key = entry.getKey(); | ||
| if (key instanceof String stringKey) { | ||
| if (stringKey.startsWith("hmcl.") || stringKey.startsWith("glass.") | ||
| || stringKey.startsWith("javafx.") || stringKey.startsWith("prism.")) { |
Member
There was a problem hiding this comment.
不应该这样做,这些信息属性有很多是 JavaFX 和 HMCL 自动生成的,比如 JavaFX 会自动添加 javafx.version 和 javafx.runtime.version 等属性,HMCL 也会根据情况添加 prism.lcdtext、prism.forceGPU 等属性,这些都不应该传递给子进程。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#5612 #5049
目前只会继承
hmcl.开头的系统属性,导致-Dglass.gtk.uiScale-Dprism.forceGPU=true-XX:+UseZGC-Xmx2G等都不会继承