Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. @ECHO OFF
  2. SETLOCAL
  3.  
  4.  
  5. :BEGIN
  6. CLS
  7. COLOR 3F >nul 2>&1
  8. SET MC_SYS32=%SYSTEMROOT%\SYSTEM32
  9. REM Make batch directory the same as the directory it's being called from
  10. REM For example, if "run as admin" the batch starting dir could be system32
  11. CD "%~dp0" >nul 2>&1
  12.  
  13.  
  14. :CHECKJAVA
  15. ECHO INFO: Checking java installation...
  16. ECHO.
  17.  
  18. REM If no Java is installed this line will catch it simply
  19. java -d64 -version >nul 2>&1 || GOTO JAVAERROR
  20.  
  21. REM Look for Java 1.8 specifically
  22. java -d64 -version 2>&1 | %MC_SYS32%\FIND.EXE "1.8"
  23. ECHO.
  24. IF %ERRORLEVEL% EQU 0 (
  25. ECHO INFO: Found 64-bit Java 1.8
  26. GOTO MAIN
  27. ) ELSE (
  28. GOTO JAVAERROR
  29. )
  30.  
  31.  
  32. :MAIN
  33. java -d64 -jar serverstarter-1.2.5.jar
  34. GOTO EOF
  35.  
  36.  
  37. :JAVAERROR
  38. COLOR CF
  39. ECHO ERROR: Could not find 64-bit Java 1.8 installed or in PATH
  40. PAUSE
  41.  
  42.  
  43. :EOF
  44. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement