Matt Gerrans
Posts: 1153
Nickname: matt
Registered: Feb, 2002
|
|
Re: exit function in frames
|
Posted: Jun 10, 2002 12:41 AM
|
|
That depends on how the DOS window was opened. If you are launching it with a batch file that the user-double clicks and the batch contains something like this: @echo off cd "program directory" java ProgramName
Then all you have to do is add the cls command as the last line and the DOS box will disappear after the program exits.
On the other hand, if you are using a shortcut, or lnk file, then right-click on it, choose Properties find the Close on Exit checkbox on the Program tab and check it.
If the DOS box was already open and you run your program by typing in the java command line or a batch file name, then you can either add "exit" to the end of the batch file, or type Ctrl-T then "exit" on the command line after the java command (assuming you are running DosKey, as any rational person should).
Finally, unless you want to see console output (it can be handy for debug and stack trace output of unhandle exceptions (not that I'm implying you would have any of those :-)), you could be running your app with javaw instead of java and there will be no unsightly DOS box to deal with in the first place. Hmm, come to think of it, you could run under Linux and you wouldn't have a DOS box...
|
|