Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jmeter wont run !Not able to find Java executable or version. Please check your Java installation"

Tags:

java

jmeter

I installed java from the offical java download page https://java.com/en/download/win10.jsp

It installed what appears to be a 32bit on my 64 bit system, which I can only guess is OK, as it did not present any other options.

I edited my system environtment variables, and added JAVA_HOME and added %JAVA_HOME%\bin to my "user variables" Path definition.

typing "set" in a cmd window produces:

JAVA_HOME=C:\Program Files (x86)\Java\jre1.8.0_151
:
Path=C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;.....C:\Program Files (x86)\Java\jre1.8.0_151\bin;

At the command prompt, "java -version"

produces:

java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) Client VM (build 25.151-b12, mixed mode)

But when I try to launch jmeter.bat, I get:

jmeter wont run !Not able to find Java executable or version. Please check your Java installation"

Any ideas?

like image 601
John Little Avatar asked Nov 27 '17 14:11

John Little


People also ask

Which version of Java is required for JMeter?

Pre-Requisites. Software Requirements: Since JMeter is pure Java software, Java should be on your machine. JMeter 4.0 supports only java 8 and 9. It does not support any prior version of java and also does not support java 10.

Why Apache JMeter is not opening?

This error occurs due to the path has not been set properly. Either you can set it in environmental varialables or right click jmeter . bat file,choose edit set the path their,for reference see the jmeter.apache.org user manuals.

Is JRE required for JMeter?

Install the latest 64-bit JRE or JDK. This is important because JMeter is a pure Java application. Once downloaded, move this file to your preferred location, extract it and go to the folder, and then, the bin directory.


2 Answers

  1. If possible move your JRE to folder which doesn't have spaces in its path.
  2. If for some reason it is not possible - surround path to "bin" folder of your JRE installation with quotation marks
  3. In any case you should be able to run JMeter as:

    java -jar ApacheJMeter.jar
    

See Setting the JAVA_HOME Variable in Windows for more details.


I would strongly recommend switching to 64-bit server JRE as on 32-bit one you won't be able to allocate more than 4 GB to JMeter which might be not enough when it comes to high loads.

Check out JMeter Best Practices and 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure articles for more information on tuning JMeter for maximum performance

like image 52
Dmitri T Avatar answered Nov 14 '22 23:11

Dmitri T


Your Java home is connected to JRE and not JDK (C:\Program Files (x86)\Java\jre1.8.0_151). See tutorial:

Windows: Set the environment variable JAVA_HOME to C:\Program Files\Java\jdk1.7.0_25

It should be connected to C:...\jdk[version] path, so set JAVA_HOME as:

set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_151
like image 32
user7294900 Avatar answered Nov 15 '22 00:11

user7294900