If your Java home is connected to JRE and not JDK (C:\Program Files (x86)\Java\jre), see tutorial.
Windows: Set the environment variable JAVA_HOME to C:\Program Files\Java\jdk\jre.
It should be connected to C...\jdk\version\path so set JAVA_HOME as:
set JAVA_HOME=C:\Program Files (x86)\Java\jdk\jre
- If possible move your JRE to folder which doesn’t have spaces in its path
- If for some reason it is not possible - surround path to "bin folder of your JRE installation with quotation marks
- 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 64bit server JRE as on 32bit one you won’t be able to allocate more than 1GB to JMeter which might be not enough when it comes to high loads.
Check out JMeter Best Practices and Easy Solutions for a JMeter Load Test “Out of Memory” Failure articles for more information on tuning JMeter for maximum performance
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: set -m JAVA_HOME "C:\Program Files\Java\jdk\jre"
Normally the JDK is stored in your C:\Program Files\Java...
You can try to add JAVA_HOME "C:\Users\User\.jdks\corretto\jre"
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.
For a straightforward and uncomplicated solution follow this link and proceed with the download.
For Java https://corretto.aws.downloads/latest/amazon-corretto-17.0.4.10-windows-jdk.msi