Skip to content

Commit 47b205d

Browse files
committed
fix start alternatives for JOSM
1 parent dc74b40 commit 47b205d

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

testing/windows/josm.ps1

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ if ($graalJs) {
186186
# launch JOSM
187187
#
188188
$Env:JAVA_HOME = $jdkHome
189-
if ($jdk -eq "jdk17" -and $useGraalVM) {
190-
# GraalVM for JDK17 is locally installed together with GraalJS.
189+
if ($useGraalVM) {
190+
# GraalVM is locally installed together with GraalJS.
191191
# We don't have to add command line options for GraalJS modules.
192192
Start-Process `
193193
-FilePath "$javaBinPath" `
@@ -199,8 +199,11 @@ if ($jdk -eq "jdk17" -and $useGraalVM) {
199199
"-Dpolyglot.engine.WarnInterpreterOnly=false", `
200200
"-XX:+UnlockExperimentalVMOptions", `
201201
"-XX:+EnableJVMCI", `
202+
"--add-exports", "java.base/sun.security.action=ALL-UNNAMED", `
203+
"--add-exports", "java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED", `
204+
"--add-exports", "java.desktop/com.sun.imageio.spi=ALL-UNNAMED", `
202205
-jar, $josmJar
203-
} else {
206+
} elseif ($graalJs) {
204207
Start-Process `
205208
-NoNewWindow `
206209
-FilePath "$javaBinPath" `
@@ -214,7 +217,28 @@ if ($jdk -eq "jdk17" -and $useGraalVM) {
214217
"-Dpolyglot.engine.WarnInterpreterOnly=false", `
215218
"-classpath", "$josmJar", `
216219
"--module-path", "$graalJsHome\lib", `
217-
"--add-modules", $graalJsModules, `
220+
"--add-modules=$graalJsModules", `
221+
"--add-opens", "java.prefs/java.util.prefs=ALL-UNNAMED", `
222+
"--add-exports", "java.base/sun.security.action=ALL-UNNAMED", `
223+
"--add-exports", "java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED", `
224+
"--add-exports", "java.desktop/com.sun.imageio.spi=ALL-UNNAMED", `
225+
"org.openstreetmap.josm.gui.MainApplication"
226+
} else {
227+
Start-Process `
228+
-NoNewWindow `
229+
-FilePath "$javaBinPath" `
230+
-ArgumentList `
231+
'-Xms1g', `
232+
'-Xmx2g', `
233+
"-XX:+UnlockExperimentalVMOptions", `
234+
"-XX:+EnableJVMCI", `
235+
"-Djosm.home=$josmHome", `
236+
"-Djava.util.logging.config.file=$loggingPropertiesFile", `
237+
"-Dpolyglot.engine.WarnInterpreterOnly=false", `
238+
"-classpath", "$josmJar", `
218239
"--add-opens", "java.prefs/java.util.prefs=ALL-UNNAMED", `
219-
"org.openstreetmap.josm.gui.MainApplication"
240+
"--add-exports", "java.base/sun.security.action=ALL-UNNAMED", `
241+
"--add-exports", "java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED", `
242+
"--add-exports", "java.desktop/com.sun.imageio.spi=ALL-UNNAMED", `
243+
"org.openstreetmap.josm.gui.MainApplication"
220244
}

0 commit comments

Comments
 (0)