ElasticSearch and Java environment variable

前端 未结 10 1136
抹茶落季
抹茶落季 2020-12-28 12:38

For Windows 7, I\'ve installed JDK in both 32 and 64 bit versions. The versions are 8, update 20 for all four installations. http://www.oracle.com/technetwork/java/javase/d

10条回答
  •  天命终不由人
    2020-12-28 13:20

    If elasticsearch version is 7.5 or higher, you find elasticsearch-7.X.Y\bin directory and then edit the elasticsearch-env.bat as the following:

       if defined JAVA_HOME (
      set JAVA="%WRITE_ELASTICSEARCH_JAVA_PATH%\bin\java.exe" //write java custom path. Edit only this line
      set JAVA_TYPE=JAVA_HOME
    ) else (
      set JAVA="%ES_HOME%\jdk\bin\java.exe"
      set JAVA_HOME="%ES_HOME%\jdk"
      set JAVA_TYPE=bundled jdk
    )
    

    You can customize the java path like that for elasticsearch.

提交回复
热议问题