I have a Java Swing application that is launched from Windows command line. This application displays a Swing window and exits when the user closes the window.
What I want is to print to Windows console a couple of messages using System.out then return from Windows console so I can close it with the application still running in background.
When running the application with java -jar ... I cannot close the Windows console without closing the application, while javaw -jar ... decouples the application from the console and no message is printed.
Is there a solution to decouple the Java application from the console during runtime?