From perini.davide at dpsoftware.org Sun Feb 4 11:16:24 2024 From: perini.davide at dpsoftware.org (Davide Perini) Date: Sun, 4 Feb 2024 12:16:24 +0100 Subject: Can't restart my JavaFX app with the latest JDK, regression in 21.02_13? Message-ID: <5036f879-3d12-4ad4-9584-43a4490f3328@dpsoftware.org> Hi there, my JavaFX 21.0.2 app experienced a very weird regression when switching from Temurin OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12 to OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13 I use this method to restart my app. public void restart() { // path to my exe app plus one string argument String[] cmdToRunUsingArgs = {"C:\Users\sblantipodi\AppData\Local\Firefly Luciferin\Firefly Luciferin.exe","string argument"}; try { Runtime.getRuntime().exec(cmdToRunUsingArgs); }catch (SecurityException | IOException e) { log.error(e.getMessage()); } javafx.application.Platform.exit(); System.exit(0); } It worked well since years until JDK 21.0.2_13. If I revert back to 21.0.1_12 it works well. That method should start a new instance of the app, and close the "old instance". With JDK 21.0.2_13, it start a new instance but as soon as System.exit(0); is executed all instances are closed. It doesn't worked that way ti the previous JDK. Are there anyone else experiencing this problem? Thanks Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: From perini.davide at dpsoftware.org Sun Feb 4 16:03:58 2024 From: perini.davide at dpsoftware.org (Davide Perini) Date: Sun, 4 Feb 2024 17:03:58 +0100 Subject: Can't restart my JavaFX app with the latest JDK, regression in 21.02_13? In-Reply-To: <5036f879-3d12-4ad4-9584-43a4490f3328@dpsoftware.org> References: <5036f879-3d12-4ad4-9584-43a4490f3328@dpsoftware.org> Message-ID: <9254245a-38d7-4a95-b46b-8de4b6cb85af@dpsoftware.org> it seems that the problem is related to jpackage, if I run the jar, the problem does not occur, if I run the exe created by jpackage, the problem occurs. Il 04/02/2024 12:16, Davide Perini ha scritto: > Hi there, > my JavaFX 21.0.2 app experienced a very weird regression when > switching from Temurin > OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12 > to > OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13 > > I use this method to restart my app. > > public void restart() { > // path to my exe app plus one string argument > String[] cmdToRunUsingArgs = {"C:\Users\sblantipodi\AppData\Local\Firefly Luciferin\Firefly > Luciferin.exe","string argument"}; > try { > Runtime.getRuntime().exec(cmdToRunUsingArgs); > }catch (SecurityException | IOException e) { > log.error(e.getMessage()); > } > javafx.application.Platform.exit(); > System.exit(0); > } > > It worked well since years until JDK 21.0.2_13. > If I revert back to 21.0.1_12 it works well. > > That method should start a new instance of the app, and close the "old > instance". > > With JDK 21.0.2_13, it start a new instance but as soon as > System.exit(0); is executed all instances are closed. > It doesn't worked that way ti the previous JDK. > > Are there anyone else experiencing this problem? > > Thanks > Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: