Allow users to override system properties (#2062)

* Allow users to override system properties

* update
This commit is contained in:
Glavo 2023-02-06 22:44:48 +08:00 committed by GitHub
parent ec6637728a
commit 5753c2993c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,10 +56,10 @@ public final class Main {
public static void main(String[] args) {
System.setProperty("java.net.useSystemProxies", "true");
System.setProperty("http.agent", "HMCL/" + Metadata.VERSION);
System.setProperty("javafx.autoproxy.disable", "true");
System.getProperties().putIfAbsent("http.agent", "HMCL/" + Metadata.VERSION);
// Fix title bar not displaying in GTK systems
System.setProperty("jdk.gtk.version", "2");
System.getProperties().putIfAbsent("jdk.gtk.version", "2");
checkDirectoryPath();