Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JMETER_HOME environment variable is not defined

I tried to execute JMeter 4.0 from the command prompt in Windows 7.

I got the following error during execution:

The JMETER_HOME environment variable is not defined correctly This environment variable is needed to run this program

I set C:\apache-jmeter-4.0\bin to JMETER_HOME variable, but the problem remains

I can start JMeter with its jar file.

I use jdk1.8.0_162 and set JAVA_HOME environment variable correctly.

like image 516
plaidshirt Avatar asked Feb 20 '18 09:02

plaidshirt


People also ask

Why is the JRE_home environment variable not defined correctly?

The JRE_HOME environment variable is not defined correctly This environment variable is needed to run this program. This issue is caused when the java.root in the hcm-setup.properties file points to the incorrect (not existing) directory. Delete the installation. Correct the JAVA path in the hcm-setup.properties file. Run the installation again.

What is user defined variables in JMeter?

In JMeter, User Defined Variables config element is used to declare and defined the variables which are used in the JMeter script. Some variables like application URL, port, etc. are generally defined in User Defined Variable element. If you need to define Global variables then add this element under the Test Plan.

Why can't I see JMeter_home on my local system?

Asually a wrong JMETER_HOME entry causes this. make sure you have JMETER_HOME pointed to jmeter folder not inside bin directory. For example ,from my local windows i am able to see this thie environment variable

What is the difference between name and value in JMeter?

Name: It’s the name of the variable which you will use in another place. The syntax to call that variable in JMeter is: Value: It’s the value corresponding to the variable in the Name column.


2 Answers

Ensure you have installed Java and JMETER Gui works fine first.

Then,

At User Variables add JMETER_HOME followed by D:\Jmeter (Where Jmeter is installed) Next select Path in User variables and add D:\Jmeter\bin(Where Jmeter bin path is)

Save and restart cmd.

P.S: This is for Windows solution

like image 82
Zarrao Zaga Avatar answered Oct 18 '22 04:10

Zarrao Zaga


You should set JMETER_HOME to main JMeter directory as C:\apache-jmeter-4.0

Also don't set JMeter directory to JAVA_HOME variable (should hold Java installation path)

like image 29
user7294900 Avatar answered Oct 18 '22 05:10

user7294900