I set all the requirement variables in / etc / profile, but when I run elasticsearch it still does not find Java. How can I set an environment variable. What is my / etc / profile
PATH=$PATH:$HOME/bin APPLICATIONS=$HOME/Applications JAVA_HOME=$APPLICATIONS/jdk1.7.0_79 PATH=$JAVA_HOME/bin:$PATH export APPLICATIONS export JAVA_HOME export PATH
Command output
[ root@87500e63467f Applications]# echo $PATH /root/Applications/jdk1.7.0_79/bin:/root/Applications/jdk1.7.0_79/bin:/root/Applications/jdk1.7.0_79/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin:/root/bin [ root@87500e63467f Applications]# echo $JAVA_HOME /root/Applications/jdk1.7.0_79 [ root@87500e63467f Applications]# java -version java version "1.7.0_79" Java(TM) SE Runtime Environment (build 1.7.0_79-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode) error: "Read-only file system" setting key "vm.max_map_count" Starting elasticsearch: which: no java in (/sbin:/usr/sbin:/bin:/usr/bin) Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME [FAILED]
in error, he says that "Running elasticsearch: which: no java in (/ sbin: / usr / sbin: / bin: / usr / bin)", it means that really java is not in this path, but how it goes when I repeat $ PATH, does it show that java is on the way?
java linux environment-variables elasticsearch
Noor
source share