mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FIX] JavaFX swing library for java 9+
This commit is contained in:
parent
a2ec922d20
commit
6c873f71c9
1 changed files with 4 additions and 1 deletions
|
@ -71,10 +71,13 @@ public static void main(String[] arguments) throws IOException, InterruptedExcep
|
|||
tryAddModule(findPath, "javafx.graphics", builder);
|
||||
tryAddModule(findPath, "javafx.fxml", builder);
|
||||
tryAddModule(findPath, "javafx.controls", builder);
|
||||
boolean useSwing = tryAddModule(findPath, "javafx.swing", builder);
|
||||
String modulePath = builder.toString();
|
||||
if (!modulePath.isEmpty()) {
|
||||
args.add("--add-modules");
|
||||
args.add("javafx.base,javafx.fxml,javafx.controls,jdk.unsupported");
|
||||
String javaModules = "javafx.base,javafx.fxml,javafx.controls,jdk.unsupported";
|
||||
if(useSwing) javaModules = javaModules.concat(",javafx.swing");
|
||||
args.add(javaModules);
|
||||
args.add("--module-path");
|
||||
args.add(modulePath);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue