So basically what I want to do is start the Bukkit server with a modified ram usage, and have the batch script set up so that when the server stops, it restarts at the beginning of the batch file, but have a menu with a timed default option that automatically restarts the server. The second option will allow me to interrupt the batch file to keep the server from starting again once it has been stopped.
What I want the script to start is this: "C:\program files\Java\jre7\bin\java.exe" -Xincgc -Xmx4G -jar "craftbukkit.jar"
So basically have a menu that is like this:
press 1 to start bukkit, press 2 to exit the script.
Option one will be timed to automatically start.
I was able to get that far with having the menu, and it starting it automatically, but after I issue the stop command in Bukkit, it just exits and I can't figure out how to get it to restart at the beginning of the script.
Here is the working menu, but not the starting back to the beginning once the program ends,
:start
choice /c:CN /n /m "bukkit will start in 5 seconds. Press to restart Now, or C to exit" /t:5 /d:N
if errorlevel 2 ("C:\program files\Java\jre7\bin\java.exe" -Xincgc -Xmx4G -jar "craftbukkit.jar" ) else goto start
But my original script is this, which pauses the window after the program exits:
"C:\program files\Java\jre7\bin\java.exe" -Xincgc -Xmx4G -jar "craftbukkit.jar"
pause
I remember being able to do something like this back with the autoexec.bat
with Windows XP, and it returning back to the menu after the menu option completed.
Any help would be appreciated.