Logstash and Elasticsearch initializes as active(exited)

Hi and thanks for reading.
Primarily, sorry about my poor english, i'm from Argentina, so.. hi from Argentina.
I have read a few tutorials about how to install ELK. Recently, a user recomended me to follow the instruccions here: https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-ubuntu-16-04. So i do that.
I have Java 8 installed. Kibana didn't give me problems, but yes Logstash and Elasticsearch.
Elasticsearch initializes as active(exited) and give me this warning:
[warning] /etc/init.d/elasticsearch: No java runtime was found
Logstash initializes as active(running) but after a few seconds changes to active(exited) and give me this message:
Starting LSB: Starts Logstash as a daemon....

Another problem is that i cant install elasticsearch 2.4 although i add "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" in /sources.list.d/elasticsearch-2.x.list

I'm going insane.
Thanks for reading

If i run the command sudo /usr/share/elasticsearch/bin/elasticsearch, elasticsearch servuce starts, but kibana shows the follow message in web interface:

This version of Kibana requires Elasticsearch ^2.3.0 on all nodes. I found the following incompatible nodes in your cluster: Elasticsearch v1.7.3 @ inet[localhost/] (
As i said, i can't install a newer version and i don't know why.
Thanks so much.

Sounds like it cannot find java in it's path. How did you install java?

Why, what happens?

I don't know. It just installs 1.7.3 version. So i did this: https://www.elastic.co/guide/en/elasticsearch/reference/current/_installation.html
The problem right now is that i cant initialize elasticsearch when Ubuntu starts up.

What does dpkg -l|grep elastic show?

Nothing. I didn't install elasticsearch by adding the source and running apt upgrade; apt install elasticsearch. I downloaded the .tar. To start elasticsearch i have to do this manually.