How to resolve the error "Unable to access jarfile ApacheJMeter.jar errorlevel=1" while initiating Jmeter? - jmeter

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.

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:
The correct answer as of current modern JMeter versions is https://stackoverflow.com/a/51973791/460802

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

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 :
https://jmeter.apache.org/usermanual/get-started.html
If you'd like to learn more about JMeter and performance testing this book can help you.

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.

If you'll go through these steps:
In the Terminal type brew install jmeter and hit Enter
When it'll be done type jmeter and hit Enter again
You won't have to solve any kind of issue.
Don't thank 😀

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.

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

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" "$#"

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

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

This error could also happen because of version mismatch of jmeter and java. As jmeter versions supports different java versions as below.
Download the zip accordingly and you are good to go.

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)

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

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

This issue will come if you download the source from the below URL :
https://jmeter.apache.org/download_jmeter.cgi
Solution :
Always download :
Apache JMeter 5.5 (Requires Java 8+)
Binaries
apache-jmeter-5.5.tgz sha512 pgp
apache-jmeter-5.5.zip sha512 pgp --- > This one
worked for me

Related

The JMETER_HOME environment variable is not defined correctly

I'm getting this error when trying to run this jmeter sentence from a maven project in java.
jmeter -g DIRECTORY -o DIRECTORY
When I run it in cmd it works perfectly but when I try to run it using this:
processBuilder.command("cmd.exe","/c","jmeter -g DIRECTORY -o DIRECTORY");
processBuilder.directory(new File("C:\\apache-jmeter-5.3\\bin"));
try {
Process process = processBuilder.start();
It says The JMETER_HOME environment variable is not defined correctly
When I run the command echo %JMETER_HOME% it returns C:\apache-jmeter-5.3
What I found weird is that in other PC it all works fine and that one doesn't have the JMETER_HOME variable defined, so I tried deleting the variable from this PC but it won't delete, it's not appearing in the system variables window but when I echo it's there.
What is going on?
Thanks in advance
So you want us to guess what is the difference between one your PC and the other one without providing any information apart from incomplete code?
I can only state that I cannot reproduce your issue and yes, I don't have JMETER_HOME variable set anywhere.
If you're using Maven maybe it worth considering looking at JMeter Maven Plugin which can automatically download JMeter, run the test and generate the HTML reporting dashboard.
Also be informed that according to JMeter Best Practices you're supposed to use the latest version of JMeter so consider upgrading to JMeter 5.4.3 (or whatever is the latest version of JMeter available at JMeter Downloads page) on next available opportunity.
I faced same issue of JMETER_HOME not been set, even though I tried setting that Env variable.
I was tying to launch the Jmeter on the Virtual system (VM) using command prompt, and didn't succeed.
I able to solve it by running the command prompt as admin and launching Jemter, it worked fine.
Note: make sure you have the set the Env. PATH set to the bin folder of Jmeter

How to excute java file from remote desktop(mstsc)

I logged into my remote desktop location from cmd by mstsc command. Made some changes in java file and saved it. But I am not sure how can I execute the java file from remote location. Can someone help me out.
Thanks and Regards,
Sm.Aslam.
I assume that you mean an uncompiled .java file. In that case, it is as easy as typing the following in Command Prompt:
javac file.java
Note that this requires Java to be installed on the remote computer. If this is not the case, you will have to install it.
Regards,
Gabe

iReport-5.6.0 is not working

I installed iReport-5.6.0 on my system. I have jadk - 1.6.0_37 installed on my machine.
When I double click on iReport icon on my desktop, initially it shows loading cursor for 1-2 seconds and then disappeares. After that there is no responce.
I am not getting exactly what happening or what do I need to configure.
I edited ireport.config file and added path "C:\Program Files\Java\jdk1.6.0_37\bin". But its giving me following message:
When I am clicking on Ok its sying need to specify userdir using command --userdir.
Can someone please help me to configure this?
I got the solution :)
I replaced installation directory from "program files/jaspersoft/" to "program files(x86)" and updated my jdk path in ireport.config. Now its working fine.

Robot framework doesn't see environment variable selenium_jar

i'm using mac
while using a pybot test.txt command i get an error msg: No executable path given, please add one to Environment Variable 'SELENIUM_SERVER_JAR'
but
i downloaded this jar from selenium site and did such things, nothing worked out:
added this folder path to /etc/paths;
added variable to etc/launchd.conf;
setenv SELENIUM_SERVER_JAR /Users/User/Downloads/SeleniumServer/selenium-server-standalone.jar
export PATH=$PATH:/Users/User/Downloads/SeleniumServer/;
after all of this i tried i run pybot test.txt and receiving the same error message.
Please, help, i just don't know how to configure robot framework to work with safari.
Based on the response to comments, it appears you set SELENIUM_JAR_FILE to the wrong value. It needs to be set to the full path of the jar file, not just the folder that contains the jar file.

Hermes Cofiguration with SoapUI 5.0.0

I am trying to set hermesJMS config file under prefernces --> tools and have given the whole path of hermes-config.xml file like this c:\..\..\hermes-config.xml and saved the preferences. But when I am trying to open HermesJMS under tools from soapUI 5.0.0 it complains about setting the prefernces, which I've already set. I also tried restarting soapUI but doesnt work. Any help is appreciated. HermesJMS was installed when I installed soapui 5.0.0. I didnt install it separately. Thanks.
Got it working, we've to give path upto hermesJMS folder and not to hermes-config.xml file for soapUI 5.0.0 (hermes installed with soapUI). Thanks
I got a similar issue on latest version 5.0 - Error: Could not create the Java Virtual Machine.
Just that it may be helpful for others I am sharing the work around. Most likely, it was a memory issue.
By default, the location is C:\Program Files (x86)\SmartBear\SoapUI-5.0.0\hermesJMS what you mentioned above. So, no need to change it.
One can go hermes.bat file at location C:\Program Files (x86)\SmartBear\SoapUI-5.0.0\hermesJMS\bin and edit last line -XX:NewSize=256m -Xmx512m to -XX:NewSize=256m -Xmx1024m.

Resources