Jump to content
Excelsior Forums
Sign in to follow this  
Xray

Console Output

Recommended Posts

Hello,

I have an application that is compiled with JET that can run in both a GUI mode and a command line mode from the same main class.  If the application is invoked with no command line arguments, then the GUI is launched.  Otherwise, the specified command line arguments run the application in the command shell.  The command line mode uses the standard output console to communicate status to the user (e.g. using System.out.println).

My problem is that if I select Hide Console in the Jet Control Panel, this command line output is suppressed and not shown to the user.  On the other hand, if don't check Hide Console, then users complain the command line window that also launches along with the GUI.

My workaround for now is to create two executables:  MyApp.exe and MyAppWindow.exe.  MyApp.exe will not check Hide Console and MyAppWindow.exe will.  This workaround does the trick, but it somewhat inconvenient because there are now two Jet projects to manage and it increase the size of the installation package.

Is there any better way to solve this?

Thanks in advance.

Ned

Share this post


Link to post
Share on other sites

Hi,

as far as I know its encoded in the exe-format if the application should open a console or not - pretty unflexible design.

What you could probably do is to write a small C launcher application, which has that console flag set, and launch your jet-compiled application out of this app.

- Clemens

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×