HI, How can I hide the console window in any swing/AWT application if we are running it by clicking on BAT file or are there any other way to run swing/AWT application in which console window does not open? I just want swing application run without any console just like any other Windows application. Regards Ikram Soomro (SCJP2, SCWCD)
use start and javaw together in a .bat file. Like so: start javaw -jar maccc.jar or start javaw -cp .\myjar.jar com.filenabber.MainClass This causes the console to flash for just a second but disappear afterwards. brian
or when creating the jar file, include a folder called META-INF with a file inside it called MANIFEST.MF which contains the line "Main-Class: yourmainclassfile" without the .class extention. when you double click the jar file it will automatically run your program.
Joined: Oct 20, 2001
Thank you very much Brian Pipa and A. Wolf. Both ideas are great. Regards, Ikram Soomro (SCJP2, SCWCD) [ April 08, 2004: Message edited by: Ikram Soomro ]
Joined: Sep 29, 2003
Just an FYI - Wolf's idea won't work in Windows when you have .jar files associated with an unzipping program (like Winzip). brian