• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to close DOS window after it's finsihed  RSS feed

 
ganesh khandagar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do i close the DOS window after it's work is done from java code?
i tried cmd /c from the Runtime.exec() but it gives me the message
"press any key to continue..." and lingers there
regards
ganesh
[ July 24, 2003: Message edited by: ganesh khandagar ]
 
paul wheaton
Trailboss
Posts: 22580
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make a batch file that you call and the last line is the DOS command "exit". You might need to make sure that there are no blank lines after that command.
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may also be able to open the process' OutputStream and write a single character to it then flush and close the stream.
 
ganesh khandagar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul
that relly worked....
Also thank u very much michael...
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!