Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/main/scripts/graylog-collector-service.bat
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ SET SERVICE_NAME=%1
FOR %%D in ("%COLLECTOR_BIN_DIR%..") DO SET COLLECTOR_ROOT=%%~dpfD

:: Detect if we are running on 32bit or 64bit Windows.
"%JAVA_HOME%\bin\java" -version 2>&1 | "%windir%\System32\find" "64-Bit" >nul:
"%JAVA_HOME%\bin\java.exe" -d32 -version 2>&1 | "%windir%\System32\find" "does not support" >nul:
IF errorlevel 1 (SET ARCH=x86) ELSE (SET ARCH=x64)

:: Use the correct executable based on the architecture.
Expand Down Expand Up @@ -65,6 +65,8 @@ ECHO ARCH: "%ARCH%"
ECHO.

:: Select the correct JVM DLL.
SET JVM_DLL=%JAVA_HOME%\jre\bin\default\jvm.dll
IF EXIST "%JVM_DLL%" GOTO actionInstall
SET JVM_DLL=%JAVA_HOME%\jre\bin\server\jvm.dll
IF EXIST "%JVM_DLL%" GOTO actionInstall
SET JVM_DLL=%JAVA_HOME%\bin\server\jvm.dll
Expand Down