1

I have made a program in eclipse that works fine with the code,

java -jar FoodVan.jar

in the command prompt however when I try to do it in a .bat file it just closes as soon as it has got to the end, how would I keep it open? I know there is a few like this however it doesn't seem to work for me

Stamp
  • 35
  • 1
  • 9
  • duplicate of [this](https://stackoverflow.com/questions/988403/how-to-prevent-auto-closing-of-console-after-the-execution-of-batch-file) – Luke Vanzweden Jan 08 '21 at 22:11

1 Answers1

2

Add "pause" without quotes to the last line of the .bat file. It pauses the display and keeps the window open.

SurvivalMachine
  • 7,946
  • 15
  • 57
  • 87