CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2002
    Posts
    17

    Question Minimize the DOS window

    Hi,
    I was wondering if there is a way to minimize the DOS window when you start a GUI program in JAVA. If so, how do you do that?
    Thanks,
    Akee

  2. #2
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163
    Use 'javaw' instead of 'java'.

    It is a bad plan that admits of no modification...
    P. Syrus
    Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

  3. #3
    Join Date
    Aug 2002
    Posts
    17
    Hi,
    Thanks for the tip. I tried that, but it does not minimize the DOS window. I want my GUI to come up with the DOS window already minimized. I'm using a batch file to do this. Is there a way to do that?
    Thanks,
    Akee

  4. #4
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163
    If you start from a console window, I don't know how you'd minimize it from Java...

    javaw is intended to be run from a Windows shortcut or menu, etc.

    One only needs two tools in life: WD-40 to make things go, and duct tape to make them stop...
    G. Weilacher
    Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

  5. #5
    Join Date
    Jan 2001
    Location
    Germany
    Posts
    222
    Use javaw, just as dlorde said. Directly after the javaw call, insert a "cls" statement. That will clear the DOS window, resulting in its being closed. I guess that's what you actually want. If not, ignore me.
    Teamwork Software - Stuff That Does Something

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured