0

I am using Jmeter 5.5.

I have created batch file for executing the test in NON GUI Mode.

Everything seems to be working fine .

In that batch file, I have written function for shutdown

I've tried these types of Functions, but don't seem to be working:-

  1. java -cp "%~dp0ApacheJMeter.jar" org.apache.jmeter.util.ShutdownClient Shutdown %*
  2. java -cp %~dp0ApacheJMeter.jar org.apache.jmeter.util.ShutdownClient Shutdown %*

Error:- Getting error message like "could not find mainclass or ApacheJMeter"

Thanks, Yazhdevi S

1 Answer 1

0

I don't think you need to "create" or "write" the batch file or function as it's there already, check out shutdown.cmd file (it lives in "bin" folder of your JMeter installation)

The point is that the function needs to be called from the directory where ApacheJMeter.jar file is, if it will be not there - the function call will fail.

If you have ApacheJMeter.jar in the current folder try using the following command:

java -cp ApacheJMeter.jar org.apache.jmeter.util.ShutdownClient Shutdown 4445

If you don't have either shutdown.cmd or ApacheJMeter.jar files in "bin" folder of your JMeter installation it means that your JMeter setup got corrupt somewhere somehow so I would suggest reinstalling JMeter from scratch

2
  • Hi Team, IN my bin folder ,shutdown.cmd and ApacheJMeter.jar files both are available. i have used following function "java -cp ApacheJMeter.jar org.apache.jmeter.util.ShutdownClient Shutdown 4445" (Which is sent by Dmitri T) Below lines came in CMD the but not happening shutdown OPRATION 1 ) Sending Shutdown request to port 4445 2 ) Press any key to continue . . . Thanks, Yazhdevi S
    – Yazhu
    Commented Aug 13, 2022 at 17:43
  • ,Answer please for above comment ? @Dmitri T
    – Yazhu
    Commented Aug 19, 2022 at 1:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.