Not able to start Elasticsearch in RHEL 7.5 with rpm package getting below error

elasticsearch[43061]: which: no java in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin)

Configurations with Root user:

[root@xxxx ~]# echo "$PATH"
/opt/devops/jdk1.8.0_171/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
[root@xxxx ~]# echo "$JAVA_HOME"
/opt/devops/jdk1.8.0_171

---