Danny - 2018-04-18

We would like to have the option of running our application from the command line by specifying a —headless option on the command line.
On Windows this seems to launch another process and we never see the output from the launched application.

I can get this to work as expected if I build our app with ‘console’ set for the <headerType> option in the launch4j configuration file.

But what I really want is in effect for the application to behave as if <headerType> had been set to ‘gui’ if the application is launched normally i.e. by double clicking it’s icon. If you run the application from the command line using the --headless option however, then the app should behave as if ‘console’ had been specified for the <headerType> option.

At the moment this is not possible as you have to specify up front which type of application you are building.

Is this hybrid approach possible?

Thanks