Installing elasticsearch logstash and kibana on a linux server error

Hi,
I was trying to install elastic search on a Linux server..however i get the following error saying it cannot find the java path

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

even though java JDK is still on the system it still cannot find it.

Please help!

How did you install java? Do you have JAVA_HOME set as it mentions?

where is java suppose to be installed? I currently have it in a directory where every program should be able to see it...
when i type java -version in putty..it tells me java exists in the system

I cannot find anything online showing me how to do the installation on a linux server

problem fixed. Thanks!

How did you fix it?