John Little
John Little

Reputation: 12338

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

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?

Upvotes: 7

Views: 53780

Answers (4)

Mike Menko
Mike Menko

Reputation: 1029

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.

Upvotes: 3

Tinashe Chinyanga
Tinashe Chinyanga

Reputation: 442

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...

Upvotes: 0

Dmitri T
Dmitri T

Reputation: 168002

  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

Upvotes: 9

Ori Marko
Ori Marko

Reputation: 58774

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

Upvotes: 3

Related Questions