Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add VM arguments to second Java call from within the Gui to circumvent module encapsulation which breaks jogl on windows #2945

Merged
merged 1 commit into from
Nov 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading