12

Here is the related error its showing:

java.exe is not a recognized file as an internal or external command, operable or external command

errorlevel=9009

halfer
  • 18,701
  • 13
  • 79
  • 158
som
  • 131
  • 1
  • 1
  • 3
  • For me, similar error with this message: `Not able to find Java executable or version. Please check your Java installation.` .. my solution posted below: http://stackoverflow.com/a/31482515/2162226 – Gene Bo Jul 17 '15 at 18:38
  • possible duplicate of [javac is not recognized as an internal or external command, operable program or batch file](http://stackoverflow.com/questions/7709041/javac-is-not-recognized-as-an-internal-or-external-command-operable-program-or) – halfer Aug 02 '15 at 08:54

14 Answers14

15

i was getting the same error on WIndows 8.1(64 bit) and checked java path but it was ok

so i just run my jmeter.bat with Run as Administrator and it worked for me

Sachin Gupta
  • 1,095
  • 14
  • 14
8

Many operating systems have an environment variable such as PATH that contains a list of directories (or folders) to be searched when looking for a command to execute. Commands that can be found via the PATH are commonly called external commands. The program that reads the command line or the batch file and invoked the commands may have a number of built in commands, these are commonly called internal commands.

I suggest you examine the PATH (or equivalent) set when your java command executes from the command line and also when execution is attempted from the batch file. Compare the two and make sure the directory containing your java.exe is in the PATH.

AdrianHHH
  • 12,664
  • 16
  • 48
  • 79
5

Does not work with Java 9 beta:

Running:

 C:\java -version

Gives:

java version "9-ea"

Just go into command line and run:

java -jar ApacheJMeter.jar
Shree
  • 18,997
  • 28
  • 86
  • 133
Jacques Koorts
  • 1,655
  • 1
  • 14
  • 10
4

Set the correct Java Path (installed in your system) in Computer -> Advanced System settings -> Environment Variables -> Ok -> System Variables -> Path

I got the same issue and resolved by following the above steps.

Learner
  • 41
  • 1
2

I tried everything, this eventually worked.

Within System Variables:

PATH = "C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.8.0_101\bin"

May help someone.

Shree
  • 18,997
  • 28
  • 86
  • 133
Tonio
  • 31
  • 3
0

This error occurs due to the path has not been set properly.

Either you can set it in environmental varialables or right click jmeter .bat file,choose edit set the path their,for reference see the jmeter.apache.org user manuals.

0

For me, my Java path has a space in it and jmeter said it can't find Java

/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home

.. I looked at the jmeter.sh script and saw it got the path from "Plugin-Ins" .. onward. I tried just commenting out the exit command after that check in the script .. and then I was able to run jmeter.

So apparently the validation logic has a bug, where the error message about can't find java is in fact not true (if Java is indeed set up correctly), so it can be ignored.

Gene Bo
  • 8,869
  • 6
  • 70
  • 118
0

For windows 8.1 Users:

Error when trying to run jmeter.bat

Error message:


Not able to find Java executable or version. Please check your Java installation. errorlevel=2 Press any Key to continue


Resolution:

Right Click jmeter.bat and Run as Administrator.

This worked for me, hope this helps. Good luck

  • This is valid only for you, your JRE was installed as Administrator, that is reason why Jmeter without leveraged privilege can not see it. – Flowy Aug 03 '18 at 12:09
0

Set the correct JM_LAUNCH variable to java.exe

0

For Windows XP users set Java environment by following the steps here:

http://www.tutorialspoint.com/jmeter/jmeter_environment.htm

Note the path depends on your installed JDK.

And download the file from:

https://svn.apache.org/repos/asf/jmeter/trunk/bin/jmeter.bat

Then replace your jmeter.bat with the downloaded file.

Mofi
  • 38,783
  • 14
  • 62
  • 115
George
  • 191
  • 4
  • 14
0

If you have installed Java and still you get this error, please set the java_home path to below using typing below command in terminal:

export  JAVA_HOME="/Library/InternetPlugIns/JavaAppletPlugin.plugin/Contents/Home"
Brian Tompsett - 汤莱恩
  • 5,195
  • 62
  • 50
  • 120
Omer Malik
  • 379
  • 6
  • 14
0

Since I run many versions of Java.. I modified jmeter.bat.

rem JM_START - set this to "start" to launch JMeter in a separate window rem this is used by the jmeterw.cmd script. rem rem =====================================================

setlocal

rem Minimal version to run JMeter set MINIMAL_VERSION=1.8.0 set PATH=%PATH%;C:\Program Files (x86)\IBM\Java80\jre\bin <<< add This line to jmeter.bat

Mike Wilcox
  • 37
  • 1
  • 4
0

Copied the JAVA executable from Installed version of Java from C:\Program FilesJava\jdk1.8.0_191\bin and pasted in the folder where the jmeter bat resides and it worked for me.

Deepak rkm
  • 409
  • 5
  • 8
0

Not exactly the same issue but somebody might find it helpful

Do not double click jmeter.bat but instead ApacheJMeter.jar in the same directory

For me jmeter.bat run but for a brief moment closing almost immediately and not prompting any error. Above workaround allowed me to start working

Uliysess
  • 329
  • 1
  • 3
  • 16