The Artima Developer Community
Sponsored Link

Java Answers Forum
Hiding the Console in Windows XP

4 replies on 1 page. Most recent reply: Mar 19, 2003 6:57 PM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 4 replies on 1 page
Ryan

Posts: 7
Nickname: rype69
Registered: Jan, 2003

Hiding the Console in Windows XP Posted: Mar 19, 2003 11:26 AM
Reply to this message Reply
Advertisement
Does anyone know how to hide the java console in Windows XP? I have tried using javaw and JStart but no joy. Does anyone have the secret?

Ryan, UK.


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Hiding the Console in Windows XP Posted: Mar 19, 2003 1:15 PM
Reply to this message Reply
How are you running the program? Javaw should do the trick, unless you are calling it from a batch file or something silly like that.

Ryan

Posts: 7
Nickname: rype69
Registered: Jan, 2003

Re: Hiding the Console in Windows XP Posted: Mar 19, 2003 4:15 PM
Reply to this message Reply
Yes I am running it from a batch file. Is there another way to create a shortcut to my application?

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Hiding the Console in Windows XP Posted: Mar 19, 2003 6:54 PM
Reply to this message Reply
Yes indeed there is. In fact, the way to do it is to create a shortcut -- which is a .lnk file. So, right click in some folder (or directory if you will), and choose "New / Shortcut" from the menu; then, just browse to the Java bin directory and use Javaw as the program and finish up. Then right click on the new shortcut and choose properties; from there, change the target to "[java bin path]\javaw.exe YourMainClass" and make the startup directory be where that class file is. You can change the icon, too. You can execute this lnk file from another program or by double-clicking, etc.

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Hiding the Console in Windows XP Posted: Mar 19, 2003 6:57 PM
Reply to this message Reply
By the way, there are several million other methods of achieving the same effect, I only mentioned one above to save virtual paper.

FYE, if you want to add more fancy preamble and postamble processing, you could use a JScript (.js file, not to be confused with JavaScript, or java) which you launch with wscript.exe.

Flat View: This topic has 4 replies on 1 page
Topic: simple array problem Previous Topic   Next Topic Topic: ArrayList problems

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use