<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Wrong list sorry, this is a message for the users one...<br>
<br>
<div class="moz-cite-prefix">Il 04/02/2024 02:49, Davide Perini ha
scritto:<br>
</div>
<blockquote type="cite"
cite="mid:25283849-f1ec-4036-b857-21f75e6bfafd@dpsoftware.org">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
Hi there,<br>
my JavaFX 21.0.2 app experienced a very weird regression when
switching from Temurin<br>
OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12<br>
to<br>
OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13<br>
<br>
I use this method to restart my app.<br>
<br>
<div style="background-color:#1e1f22;color:#bcbec4">
<pre
style="font-family:'JetBrains Mono',monospace;font-size:9,8pt;"><span
style="color:#cf8e6d;">public void </span><span
style="color:#56a8f5;">restart</span>() {
// path to my exe app plus one string argument
String[] cmdToRunUsingArgs = {<span style="color:#6aab73;">"C:\Users\sblantipodi\AppData\Local\Firefly Luciferin\Firefly Luciferin.exe"</span>,<span
style="color:#6aab73;"> "string argument"</span>};
<span style="color:#cf8e6d;">try </span>{
Runtime.<span style="font-style:italic;">getRuntime</span>().exec(cmdToRunUsingArgs);
} <span style="color:#cf8e6d;">catch </span>(SecurityException | IOException e) {
<span style="color:#c77dbb;font-style:italic;">log</span>.error(e.getMessage());
}
javafx.application.Platform.<span style="font-style:italic;">exit</span>();
System.<span style="font-style:italic;">exit</span>(<span
style="color:#2aacb8;">0</span>);
}</pre>
</div>
<br>
It worked well since years until JDK 21.0.2_13.<br>
If I revert back to 21.0.1_12 it works well.<br>
<br>
That method should start a new instance of the app, and close the
"old instance".<br>
<br>
With JDK 21.0.2_13, it closed the running instance but does not
open a new instance.<br>
<br>
I don't know if open a bugreport to JDK but before opening the bug
report I would like to ask you if that method to restart the app
is correct or if you think that I can use a better way.<br>
<br>
Thanks<br>
Davide<br>
<br>
<br>
<br>
<br>
<br>
<br>
</blockquote>
<br>
</body>
</html>