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

5

7

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?

Oxa answered 27/11, 2017 at 14:2 Comment(0)
W
9
  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

Whippletree answered 27/11, 2017 at 14:23 Comment(0)
I
3

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
Icecap answered 27/11, 2017 at 14:14 Comment(1)
For others searching, on OS X this looks like: export JAVA_HOME=/Library/Java/JavaVirtualMachines/[JDK VERSION]/Contents/Home Replace [JDK VERSION] with your installed version of java.Tello
S
3

You can try to add JAVA_HOME "c:\Users\User\.jdks\corretto-1.8.0_322" to System variables, but in my case I had to add %JAVA_HOME%\bin to PATH System variable as well. As a result - I can you orignal jmeter.bat file.

Salomie answered 21/3, 2022 at 14:59 Comment(1)
same here. To run jmeter.bat JAVA_HOME\bin must be added to the path.Midget
K
0

Check-out this article, best way to set JAVA_HOME. The long and short of it, if using Windows, download the JDK, open your command prompt and type in the following command: setx -m JAVA_HOME "C:\Progra~1\Java\jdk1.8.0_XX". Normally, the JDK is stored in your C:\Program Files\Java...

Kirov answered 14/3, 2019 at 20:38 Comment(1)
It could be C:\Progra~2Aparejo
A
0

For a straightforward and uncomplicated solution, follow this link and proceed with the download.

For Java 11 https://corretto.aws/downloads/latest/amazon-corretto-11-x64-windows-jdk.msi

Anamariaanamnesis answered 17/2 at 4:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.