Set JMETER_HOME Variable on Windows
Set JMETER_HOME Variable on Windows
Setting the JMETER_HOME environment variable in Windows ensures that JMeter can be accessed easily from the command line or scripts.
Step 1: Locate JMeter Installation Directory
Before setting the environment variable, you need to find where JMeter is installed:
- By default, JMeter is installed in:
C:\apache-jmeter-<version> - Note the full path, as you will use it in the next steps. For example, C:\apache-jmeter-5.6.3
Step 2: Open System Properties
- Press
Win + R, typesysdm.cpl, and press Enter. - Go to the Advanced tab.
- Click on Environment Variables.
Step 3: Add JMETER_HOME Variable
- Under System Variables, click New.
- Set Variable Name as:
JMETER_HOME - Set Variable Value as the JMeter installation path, e.g.:
C:\apache-jmeter-5.6.3 - Click OK to save.
Step 4: Add JMeter bin Directory to Path
- In the Environment Variables window, find Path under System Variables and click Edit.
- Click New and enter:
%JMETER_HOME%\bin - Click OK to save changes.
Step 5: Verify the Configuration
- Open the Command Prompt by pressing
Win + R, typingcmd, and pressing Enter. - Type the following command and press Enter:
echo %JMETER_HOME% - If configured correctly, it should display the JMeter installation path.
- To check if JMeter is accessible, type:
jmeter -v - If JMeter is installed correctly, it will display the version details.
Setting the JMETER_HOME variable makes it easier to run JMeter from the command line. Now, you can execute JMeter commands globally without navigating to the installation folder.