Possible duplicate:
Is there a way to hide the win32 startup console from a Java program (if possible without JNI)
When I run the java swing application in a batch file on the windows, the console / command window remains open while the Java application is running. This creates an additional window on my taskbar that I would rather not have. But when I close the command window, it stops my Java application. Is there a way, possibly using the batch file or command line options or changing the code in my application, to exit java.exe after I run the swing application and the console window while my application is still running?
The main method is as follows:
public static void main(String args[]) {
ApplContext applContext = new ApplContext();
Throwable error = null;
try {
applContext.setUserConfigDir(args.length>0 ? args[0] : null);
applContext.loadData();
ApplTools.initLookAndFeel(Parameters.P_NIMBUS_LAF.of(applContext.getParameters()));
} catch (Throwable e) {
error = e;
}
new JWorkSheet(applContext, error).setVisible();
}