Java runtime is required to run Logstash. Logstash requires Java 8. Make sure that JAVA_HOME is set as an environment variable, and to check your Java version, run the following command:
java -version
You should see the following output:
java version "1.8.0_65" Java(TM) SE Runtime Environment (build 1.8.0_65-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
For Java, you can use the official Oracle distribution (http://www.oracle.com/technetwork/java/javase/downloads/index.html) or an open source distribution such as OpenJDK (http://openjdk.java.net/).