Hosted by:
SourceForge
Get Firefox!

wrapper.ntservice.hide-console Property
wrapper.ntservice.hide-console Property
Configuration Property Overview
wrapper.ntservice.hide_console

This property is ignored unless the Wrapper is being run as an NT service with the interactive property set to true and should only be needed if the application's GUI is not being displayed correctly. This will be true for all versions of Java prior to version 1.4.0. Before playing with this property, I'll explain the problems involved so you will understand the Wrapper's behavior.

When an NT Service is launched with the interactive property set to true, the service is running in an environment in which a console window does not exist. In order to capture the console output of a Java application the Wrapper must create a console for the JVM to use. Normally this console would be visible to the user along with the Java application's GUI. It appears as an unresponsive console that can not be closed by the user. Obviously users would not like having this console around, so the Wrapper hides it by default.

Java 1.4.x will correctly show the GUI window even if its console is hidden so things will work correctly and the Java GUI will be visible. But earlier versions of Java display their windows using the default window state for the process, meaning that they too will be hidden. It seems that users of Java 1.3.x and 1.2.x would also like to be able to display a GUI while running as a service, so a workaround was added. :-)

In order to be able to display the Java GUI with older JVMs, the console can not be hidden by default. If the JVM is launched with the console visible then it will be able to correctly display its GUI.

Disabling the feature that hides the console is done by setting the wrapper.ntservice.hide-console property to false. This will cause the Wrapper to launch the Java application along with its Console in a visible state, so the JVM can correctly display its JVM.

Example:
wrapper.ntservice.hide-console=false

So what about that ugly black console, you may ask? Well the good news is that the Wrapper will look for the console window and hide it almost immediately after the JVM has been launched. This is done so that the user will not have to stare at it while they are using your application.

The only problem is that the big black console will flash rather obviously which may distract users. It was decided to hide the console by default so that users with newer JVMs would not have to put up with it.

NOTE

If any Windows API gurus out there can figure out a way to display the Java GUI on older JVMs without this work around, I would love to hear it.

NOTE

Reloading the Wrapper configuration will have no effect on the value of this property. Changes will not take effect until the Wrapper has been restarted.

by Leif Mortenson

last modified: