Hello guys, im trying to find a script to restart my minecraft forge server after a crash and i already tried this but it doesnt work, if the server tries to restart it says Error: Unable to access jarfile server-1.18.2.jar
Here is the script i use :
@echo OFF
:loop
java -server -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=4 -XX:+AggressiveOpts -Xms4G -Xmx4G -jar server-1.18.2.jar nogui
echo Press control+C to exit the server!
timeout 10
echo (%time%) Restarting!
goto loop