ElasticSearch配置优先使用自带jdk

x33g5p2x  于2022-02-22 转载在 ElasticSearch  
字(0.7k)|赞(0)|评价(0)|浏览(702)

1 介绍

ElasticSearch jdk配置

2 windows

修改elasticsearch-env.bat

if defined ES_JAVA_HOME (
  set JAVA="%ES_JAVA_HOME%\bin\java.exe"
  set JAVA_TYPE=ES_JAVA_HOME
) else if defined JAVA_HOME (
  rem fallback to JAVA_HOME
  echo "warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME" >&2
  set JAVA="%JAVA_HOME%\bin\java.exe"
  set "ES_JAVA_HOME=%JAVA_HOME%"
  set JAVA_TYPE=JAVA_HOME
) else (
  rem use the bundled JDK (default)
  set JAVA="%ES_HOME%\jdk\bin\java.exe"
  set "ES_JAVA_HOME=%ES_HOME%\jdk"
  set JAVA_TYPE=bundled JDK
)

set JAVA="%ES_HOME%\jdk\bin\java.exe" 
set JAVA_HOME="%ES_HOME%\jdk"

参考文章:
https://blog.csdn.net/xiaoxiong_web/article/details/105597150

相关文章