The following small Java program and jpackage
command create an app-image which when launched on Windows 10 launches multiple exe's. This does not happen before JDK 17. The same code and command using the JDK 16 jpackage results in only a single instance of Main.exe running in the Task Manager Details tab. Issue appears to still happen in JDK 18 and 19.
import javax.swing.*;
public class Main {
public static void main(String[] args) {
JDialog dialog = new JDialog();
dialog.setVisible(true);
}
}
jpackage --type app-image --input jpackage_test_jar --dest install/tmp --main-jar jpackage_test.jar --main-class Main
Result (Main.exe twice in Task Manager Details)
Tested the same code and jpackage command on JDKs 15, 16, 17, 18 and 19. Multiple exe's are launched on Windows 10 in JDKs 17, 18 and 19, but not in 15 or 16. JDK 15 was from AdoptOpenJDK, the rest were Eclipse Temurin from Eclipse Adoptium.