JMETER_HOME environment variable is not defined

2019-04-27 00:06发布

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.

5条回答
Viruses.
2楼-- · 2019-04-27 00:21
  • First ensure you've Java installed
  • Second you need to ensure the working directory of your call is the JMeter installation directory.

Assumption your JMeter installation is located under:

C:\Program Files (x86)\apache-jmeter-4.0

then you need to set this as working directory.


As you can read in the jmeter.bat file itself:

JMETER_HOME - installation directory. Will be guessed from location of jmeter.bat

查看更多
再贱就再见
3楼-- · 2019-04-27 00:25

This might sound obvious, but I'm getting this error on machines that don't have Java installed. Of course, though a better message might have been nice!

查看更多
你好瞎i
4楼-- · 2019-04-27 00:31

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

Also don't set jmeter directory to JAVA_HOME variable

查看更多
Luminary・发光体
5楼-- · 2019-04-27 00:35

One reason for getting this error is to have JMETER_HOME variable defined in the environment variables but pointing to the wrong location. I had this problem due to previous installation.

查看更多
Lonely孤独者°
6楼-- · 2019-04-27 00:35

You don't need to set JMETER_HOME path explicitly under user variables, just add/change under system variables under path variable as your bin path. If you already have earlier version of JMeter just append with latest version. Path looks like : C:\XXX\apache-jmeter-4.0\bin

查看更多
登录 后发表回答