41
votes

Download Jmeter and execute the batch file (Jmeter\apache-jmeter-2.6\bin\jmeter.bat).
We get the error message in the console:

Unable to access jarfile ApacheJMeter.jar errorlevel=1

Kindly help me to resolve the problem.

14
What version of Windows, Java (and is it JDK or JRE) and are you running the .bat from the command line, the run menu or a command prompt? If you are using XP or new, are you able to use JMeter by calling it using one of the .cmd files (such as Jmeter\apache-jmeter-2.6\bin\jmeterw.cmd)?Lee Lowder
I had the same problem. I download the 3.0 .zip file from github.com/apache/jmeter/releases but didn't realize that was only the source code. Downloading from jmeter.apache.org/download_jmeter.cgi did it for me.Kevin Doyon
If you download the source file from the official website, it's broken as the package is missing the ApacheJMeter.jar (may be it's the corrupted package from the mirror). Go to Archives "apache.mirrors.nublue.co.uk//jmeter/binaries" and get the latest binary (for me it's meter-4.0). That should have the latest ApacheJMeter.jar in the bin foldervijay pujar
just download the jmeter binaries (tar/zip), NOT 'source' tar/zip.Zhivko.Kostadinov

14 Answers

50
votes

Try downloading apache-jmeter-2.6.zip from http://www.apache.org/dist/jmeter/binaries/

This contains the proper ApacheJMeter.jar that is needed to initiate.

Go to bin folder in the command prompt and try java -jar ApacheJMeter.jar if the download is correct this should open the GUI.

Edit on 23/08/2018:

11
votes

I got this error today because the "Source" is missing the ApacheJmeter.jar. I downloaded it again from "Binaries" and everything works as expected.

5
votes

JMeter should be started using :

  • jmeter/bin/jmeter.sh for Linux
  • jmeter/bin/jmeter.bat for windows

this will ensure correct property files are read and necessary jars in lib are loaded.

any other method will expose you to a lot of trouble.

the most upvoted answer is wrong !

See 1.4 Running JMeter in reference documentation :

If you'd like to learn more about JMeter and performance testing this book can help you.

3
votes

I'm running JMeter 2.8 (Windows 7) and received a message similar to that in the original post:

C:\>jmeter
Error: Unable to access jarfile C:\local\software\jMeter\apache-jmeter-2.8\binApacheJMeter.jar
errorlevel=1
Press any key to continue . . .

I'd created a Windows environment variable JMETER_BIN and set it to the JMeter path which I could see contained ApacheJMeter.jar (so it wasn't a question that the jar was missing).

I should have noticed at the time this portion of the error: "binApacheJMeter.jar"

When I went to the jmeter.bat file to troubleshoot, I noticed this line:

%JM_START% %JM_LAUNCH% %ARGS% %JVM_ARGS% -jar "%JMETER_BIN%ApacheJMeter.jar" %JMETER_CMD_LINE_ARGS%

and that caused me to revisit the "binApacheJMeter.jar" portion of the error.

What was happening was that the batch file was requiring a trailing slash on the end of the path in the JMETER_BIN environment variable to correctly specify the location of the .jar.

Once I corrected my environment variable, adding the trailing slash, all was wonderful.

YMMV, but this worked for me.

2
votes

I faced with the same error, when i downloaded the Jmeter Source, and it got fixed once i downloaded Jmeter Binary. Please watch this video.

1
votes

navigate to the url http://jmeter.apache.org/download_jmeter.cgi-->download apache-jmeter-2.11.zip, which is under binaries.

this error is occurring since Apache jmeter.jar is missing in bin folder

1
votes

If you are using linux and faced such problem during creating link, try to change jar file path of original jmeter file.

+ java -server -XX:+HeapDumpOnOutOfMemoryError -Xms512m -Xmx512m -XX:NewSize=128m -XX:MaxNewSize=128m -XX:MaxTenuringThreshold=2 -XX:PermSize=64m -XX:MaxPermSize=128m -XX:+CMSClassUnloadingEnabled -jar ./ApacheJMeter.jar -help

Change to:

java $ARGS $JVM_ARGS -jar "/opt/apache-jmeter-2.11/bin/ApacheJMeter.jar" "$@"
1
votes

Try to use updated JMeter version which is JMeter 3.0 now.

0
votes

This error could also happen because of version mismatch of jmeter and java. As jmeter versions supports different java versions as below.

Image of java versions supported for jmeter versions

Download the zip accordingly and you are good to go.

0
votes

If you'll go through these steps:

  1. In the Terminal type brew install jmeter and hit Enter
  2. When it'll be done type jmeter and hit Enter again

You won't have to solve any kind of issue. Don't thank 😀

0
votes

For people still getting the issue.

I face same problem and seems some .jar file missing.

so try tar -xf apache-jmeter-5.2.1.tgz in the console rather than just right click unzip. And also, try binary package if source package still has an issue. this solve my issue (I am using ubuntu)

0
votes

For window if you download scr folder say apache-jmeter-5.3_src then you won't find ApacheJMeter.jar file insider bin folder.One might have downloaded zip file under source section. Form this link download zip file under binaries section and click on ApacheJMeter.jar from bin folder https://jmeter.apache.org/download_jmeter.cgi

0
votes

When we download the binary of apache-jmeter-x.x.tgz, where x could be any version of apache Jmeter. ApacheJMeter.jar must present inside apache-jmeter-x/bin folder , if it is not present somewhere your package not downloaded properly. Cause could be slow internet, or improper shutdown

Download package again and make sure ApacheJMeter.jar present in apache-jmeter-x/bin folder. Once it is present hit sh jemeter.sh

0
votes

I had moved the apache jmeter folder to c:, open cmd with admin grant and execute jmater.bat.

This solved the problem for me.