You launch a java program from a console (maybe using a .bat script). I don't want the console to remain visible, I want to hide it.
Is there a simple way to do this ? Without JNI ?
If its a console app and the user is interacting with it then you ask the user to enter a value that indicates to you that they want to stop the app. If yoy are not interacting with the user at all then ctrl-c will have to work.
In the Java Control Panel, click the Advanced tab. Expand the Java console option. Select Show Console and click OK.
Use javaw.
http://java.sun.com/javase/6/docs/tooldocs/windows/java.html
The javaw command is identical to java, except that with javaw there is no associated console window. Use javaw when you don't want a command prompt window to appear. The javaw launcher will, however, display a dialog box with error information if a launch fails for some reason.
You can start a java application with start javaw
. It will hide the black console window.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With