Skip to content

Commit

Permalink
don't limit bat to java 8
Browse files Browse the repository at this point in the history
  • Loading branch information
BloodWorkXGaming committed May 31, 2021
1 parent 09d95e3 commit a4ae8c8
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/main/resources/startserver.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,19 @@ ECHO INFO: Checking java installation...
ECHO.

REM If no Java is installed this line will catch it simply
java -d64 -version >nul 2>&1 || GOTO JAVAERROR
java -version 2>&1 || GOTO JAVAERROR

REM Look for Java 1.8 specifically
java -d64 -version 2>&1 | %MC_SYS32%\FIND.EXE "1.8"
ECHO.
IF %ERRORLEVEL% EQU 0 (
ECHO INFO: Found 64-bit Java 1.8
ECHO INFO: Found 64-bit Java
GOTO CHECK
) ELSE (
GOTO JAVAERROR
)


:MAIN
java -d64 -jar serverstarter-@@serverstarter-libVersion@@.jar
java -jar serverstarter-@@serverstarter-libVersion@@.jar
GOTO EOF

:CHECK
Expand All @@ -46,9 +44,9 @@ IF NOT EXIST "%cd%\serverstarter-@@serverstarter-libVersion@@.jar" (

:JAVAERROR
COLOR CF
ECHO ERROR: Could not find 64-bit Java 1.8 installed or in PATH
ECHO ERROR: Could not find 64-bit Java installed or in PATH
PAUSE


:EOF
pause
pause

0 comments on commit a4ae8c8

Please sign in to comment.