• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Execution from .bat file

 
Ranch Hand
Posts: 529
C++ Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I posted a similar question to this earlier. I would like to know how to keep a DOS window open after my Java program has completed it's execution when starting it from a batch file. I know that I can make the Java program go into some kind of loop and that would keep the window open until I stop it, but can I do this from the batch file. Thanks!!!

Barry
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Barry,
Have you tried just putting a pause in the batch file:
java program
pause
Regards,
Manfred.
 
Barry Andrews
Ranch Hand
Posts: 529
C++ Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Manfred,
Yes, actually I have tried that but it finishes the Java program, exits the other DOS window, and THEN pauses. I found something that works. I made a while (true) at the very end of my Java program and then do a echo Hit Control + C to exit. And do a pause after that. This works for me. Can you think of another way? Thanks!!!
Barry
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!