Jump to content
Excelsior Forums
Sign in to follow this  
johnrule

hide console window

Recommended Posts

You misunderstand...

I need to minimize the console window that has been added to my executable. The window shows when my app is launched, which is fine, but I would like to control the hiding and showing of this window during runtime.

Thanks,

JR

Share this post


Link to post
Share on other sites

The operating system is responsible for showing/hiding the console window on start-up.  It's not controlled programmatically - just a flag in the EXE's header.

but I would like to control the hiding and showing of this window during runtime.

We are not aware of how to implement it in pure Java.

If you are ready to go as far as writing a special native method, you should obtain the window handle, e.g. by iterating all windows of the process, and manipulate with it using the system API.

Share this post


Link to post
Share on other sites

but I would like to control the hiding and showing of this window during runtime.

I would also suggest you to emulate console window in pure Java writing it in Swing (SWT) and resetting System.out, System.err for it.

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  

×