I am installing elsticsearch in the oracle linux 6.8
I set java version as hotspot by definig JAVA_HOME parameter in the .bash_profile file.
when i type (java -version) in terminal, output is as following
[srahimi@admin ~]$ java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
but when i used (sudo -i service elasticsearch start) command, following error has been shown:
Starting elasticsearch: the minimum required Java version is 8; your Java version from [/usr/lib/jvm/java-1.7.0-openjdk-22.214.171.124.x86_64/jre] does not meet this requirement
what is the matter?