pledgeX
pledgeX

Reputation: 25

Unable to run Jmeter.bat

I'm trying to use Jmeter but am coming across an issue when I try and run it using the Jmeter.bat file.

It's spits out the following error:

'java -version 2>&1 | findstr /i "version"' is not recognized as an internal or external command, operable program or batch file.
Not able to find Java executable or version. Please check your Java installation.
errorlevel=2
Press any key to continue . . .

I've tried googling this and lots of posts mention that this error is usually down to the environment variables not being set correctly, but I'm fairly sure they are as if I type java or javac into the command prompt I get a response.

I've got them set as follows:

I tried taking the string it's complaining about and pasted that into the command prompt by itself and it ran fine:

C:\Windows\System32>java -version 2>&1 | findstr /i "version"
java version "1.8.0_25"

So why is it throwing the error when running the batch file but not if I paste it in manually? The batch file is located in a folder in my C drive and I'm running by right clicking and selecting 'Run as Administrator'. If I just double click the .bat file I get the error:

Windows cannot find 'C:\apache-jmeter-2.13_src\bin\jmeter.bat'. Make sure you typed the name correctly, and then try again

Is the above error related or is that a separate permissions issue?

Thanks for any help

Upvotes: 1

Views: 17847

Answers (2)

Abhay Dixit
Abhay Dixit

Reputation: 1018

From command Prompt go to bin folder of apache jmeter and type following command:
C:\apache-jmeter-3.0\bin> java -jar ApacheJmeter.jar

Upvotes: 4

murali koripally
murali koripally

Reputation: 113

I also faced similar problem when I extracted the JMeter in C. In my case, i don't have admin rights. I assume it is related to some permission issue. So better copy to D: and then check.

Copy C:\apache-jmeter-2.13_src folder to other drive (D:) or download JMeter and extract in D drive and run the batch file.

Upvotes: -1

Related Questions