As Apache JMeter is a pure JAVA based open source tool, we need a compatible Java version to run Apache JMeter. So let's start with how to install Java. Check the below table which states which Java version has to be downloaded to make both JMeter and Java compatible.
|JMeter Version||Release Date||Java Version|
|3.1||2016-11-19||Java 7+||3.2||2017-04-13||Java 8+||3.3||2017-09-21||Java 8+||4.0||2018-02-10||Java 8 or 9||5.0||2018-09-18||Java 8 or 9|
If you are using latest version of JMeter we can see it requires Java 8+. So let's see how to install Java 8.
To download the Java 8 go to the official site of oracle, under Java Platform, Standard Edition you can find the latest version of Java which is of Java SE 8u191/ Java SE 8u192.
By clicking on the link you will be redirecting to the Java SE Development Kit 8 Downloads, accept the license agreement and click on the Windows x 84/ 64 accordingly.
You can find .exe find being downloaded. Once the download was done just install the application. You can find the Java was installed was installed successfully.
Now we need to instruct our windows OS to pick this version of Java, so we need to setup the environmental variables by navigating through Control Panel > System > Advanced system settings.
Now switch to Advanced tab > Environment Variables.
Under User Variables, Click on New and add the following Variable name and Variable value.
|Variable name||Variable value|
Make sure that the longish your-unique-entries do not contain any other references to another Java installation folder. Note that these environment variables are derived from the `root` environment variable JAVA_HOME. This makes it easy to update environment variables when updating the JDK. And don't delete any existing entries. Once it was done verify the java installation by going to command prompt and execute java-version. You can see the java was installed successfully.