This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Hi, I would like to know how to run a Swing application in Windows (any flavor), without that ugly DOS console window in the background. It would be great if I could also create a shortcut to the application. Thanks, RP
Hi Regus, Simply put the following line into any *.bat file and create a desktop shortcut to it and you are all set. The console window will appear and disappear quickly while your program is loading. Runner.bat: @javaw SomeProgram where SomeProgram is a compiled class file in the current directory. Regards, Manfred.
Here's another neat way to do it. Create a shortuct for it with this as the target:
THEN, in the Start In field add the path to the directory where your classfile is such as: c:\apps\javapps\myprogram If that doesn't work for some reason, what I've done is modified the target have the javaw.exe -classpath c:\apps\javapps\myprogram. Its nifty, no batch files, no dos windows, etc....
Ryan Headley<br /><a href="http://www.sudovi.com" target="_blank" rel="nofollow">http://www.sudovi.com</a>
Joined: Oct 30, 2001
Thanks guys! Both ways worked great. People like you help make these forums (fora?) excellent resources for all of us. Reg