I'm using ELasticsearch on ubuntu 18.04 (AWS). While i try to run "./elasticsearch-setup-passwords" script it is showing following error.
future versions of Elasticsearch will require Java 11; your Java version from [/usr/lib/jvm/java-8-openjdk-amd64/jre] does not meet this requirement
But while I check for Jaa version it shows Java 11.
root@ip-162-41-63-148:/usr/share/elasticsearch/bin# java -version
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-2ubuntu218.04)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-2ubuntu218.04, mixed mode, sharing)
I upgrade Java from 8 to 11.
Why still this problem occur? And how to fix it?
JAVA_HOME was still set to Java 8 jre folder. So I change the JAVA_HOME path to java 11 then it was working fine.
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.