Skip to content

Commit

Permalink
Merge pull request #2945 from matsim-org/gui
Browse files Browse the repository at this point in the history
add VM arguments to second Java call from within the Gui to circumvent module encapsulation which breaks jogl on windows
  • Loading branch information
kainagel authored Nov 18, 2023
2 parents c262911 + 3db5b9e commit 1068c6c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions matsim/src/main/java/org/matsim/run/gui/Gui.java
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,14 @@ private void startMATSim() {
}
absoluteClasspath.append(new File(cpPart).getAbsolutePath());
}
String[] cmdArgs = new String[] { txtJvmlocation.getText(), "-cp", absoluteClasspath.toString(),
"-Xmx" + txtRam.getText() + "m", mainClass, txtConfigfilename.getText() };
String[] cmdArgs = new String[] { txtJvmlocation.getText(),
"-cp", absoluteClasspath.toString(),
"-Xmx" + txtRam.getText() + "m",
"--add-exports", "java.base/java.lang=ALL-UNNAMED",
"--add-exports", "java.desktop/sun.awt=ALL-UNNAMED",
"--add-exports", "java.desktop/sun.java2d=ALL-UNNAMED",
mainClass, txtConfigfilename.getText() };
// see https://jogamp.org/bugzilla/show_bug.cgi?id=1317#c21 and/or https://github.com/matsim-org/matsim-libs/pull/2940
exeRunner = ExeRunner.run(cmdArgs, textStdOut, textErrOut,
new File(txtConfigfilename.getText()).getParent());
int exitcode = exeRunner.waitForFinish();
Expand Down

0 comments on commit 1068c6c

Please sign in to comment.