<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi, <br>
</p>
<p>Does that Temurin build contain JavaFX, or is it just a new
Temurin build? Did you change anything else besides the JDK
used? You could try other JDK's (openjdk, corretto, etc) as well.<br>
</p>
<p>Is there anything being logged that may indicate what went wrong?</p>
<p>That all said, it seems really unlikely this is related to
JavaFX. <br>
</p>
<p>If System.exit(0) is killing both the new and old application,
then it wasn't really spawned independently, so you can look into
that (you could put a delay there, and see with a tool like `top`
or Task Manager says, and see whether the restarted app is a child
process or not).</p>
<p>It's also possible the problem is in the tools/settings used to
create the ".exe", so see if you changed anything there.<br>
</p>
<p>For more info, tips or other ways of doing restarts:
<a class="moz-txt-link-freetext" href="https://stackoverflow.com/questions/4159802/how-can-i-restart-a-java-application">https://stackoverflow.com/questions/4159802/how-can-i-restart-a-java-application</a></p>
<p>--John<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 04/02/2024 02:49, Davide Perini
wrote:<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>
</body>
</html>