@echo off
set err=1
if exist log\java0.log.0 (
move log\java0.log.0 "log\%date:~6,4%-%date:~3,2%-%date:~0,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%_java.log"
)
if exist log\stdout.log (
move log\stdout.log "log\%date:~6,4%-%date:~3,2%-%date:~0,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%_stdout.log"
)
java -Djava.awt.headless=true %type% -jar ../libs/LoginServer.jar > log\stdout.log 2>&1
set err=%errorlevel%
if not %err%==0 (
echo Error: LoginServer exited with error code %err%
pause
)