I know that if you use javaw instead of java to call your program from a bat file you can close the console window manualy and the JVM will still keep your application open. What I want to know is if there is a way to either in the bat file or the application to automaticaly close that console window once the application is started. Thank you in advance.
I am guessing that you are running under Windows 2000 or XP (I think XP does the same thing). There is a bug(?) in javaw for those platforms that does not close the console window -- as you have seen. The only way that I know of to get around that is to run your app from a jar file using 'javaw -jar ...'. Running from a jar file does not keep the window open.
I'm not sure that this would work on all versions of Windows. It works on Windows XP Professional. In your bat file, you could invoke javaw as follows. start javaw Foo But note that a more platform independent strategy would be to create an executable JAR, as Chris mentioned. [ February 28, 2004: Message edited by: Dirk Schreckmann ]