Logstash does not start; does not accept Java version

Best regard. I would like to know why the Logstash (version 6.1.1) that I have installed locally, does not accept the Java version that is on my computer. After locating in DOS in the directory where I have it installed ("c: \ Elastic Stack \ logstash-6.1.1"), when I give the instruction "bin \ logstash" it produces the following error message:

Can not find Java 1.5 or higher.

Also, if located in the directory of your installation I give the instruction "bin \ logstash -e 'input {stdin {}} output {stdout {}}'" (to test the installation), it produces the same error message. The same thing happens if I give the instruction "bin \ logstash -f logstash.conf".

Previously I have already started both 'Elasticsearch' (version 6.1.0) and 'kibana' (version 6.1.1). I have Windows 7 Home Basic operating system.

The version of Java that I installed is the 8 (Update 151). Although I do not know why when I check it in DOS (with the instruction "java -version") it throws the following information:

java version "1.8.0_151"
Java (TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot (TM) 64-Bit Server VM (build 25,151-b12, mixed mode)

It seems as if it were the 1.8; even so, this is still greater than the 1.5 required by the Logstash.

I'm just beginning to know and use these tools. The next thing I have planned to do is install 'Beats' (Filebeats).

Please, have someone tell me what will be happening with the Java version and how to solve the problem.

I am very grateful to you in advance for your collaboration.

Please look at the attached image.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.