Filter client/server VM options from jvm.options
The default jvm.options file ships with the -server flag to force the server VM on systems where the server VM is not the default. However, the method of starting the JVM via the Windows service does not support the command-line flags for selecting the VM because it starts from a DLL that is specific to the server or client VM. Thus, we need to filter these options from the jvm.options configuration file when installing the Windows service. Relates #18473
This commit is contained in:
parent
332f6ffe59
commit
452faa220c
|
@ -163,7 +163,7 @@ set ES_JVM_OPTIONS="%ES_HOME%\config\jvm.options"
|
|||
if not "%ES_JAVA_OPTS%" == "" set ES_JAVA_OPTS=%ES_JAVA_OPTS: =;%
|
||||
|
||||
@setlocal
|
||||
for /F "usebackq delims=" %%a in (`findstr /b \- "%ES_JVM_OPTIONS%"`) do set JVM_OPTIONS=!JVM_OPTIONS!%%a;
|
||||
for /F "usebackq delims=" %%a in (`findstr /b \- "%ES_JVM_OPTIONS%" ^| findstr /b /v "\-server \-client"`) do set JVM_OPTIONS=!JVM_OPTIONS!%%a;
|
||||
@endlocal & set ES_JAVA_OPTS=%JVM_OPTIONS%%ES_JAVA_OPTS%
|
||||
|
||||
if "%ES_JAVA_OPTS:~-1%"==";" set ES_JAVA_OPTS=%ES_JAVA_OPTS:~0,-1%
|
||||
|
|
Loading…
Reference in New Issue