Search code examples
jmeteradoptopenjdk

Issue in jmeter with adopopenjdk 8


I am trying to execute one jar having few parameter as well in apache-jmeter-5.1.1. I am running Thread Plan -> OS Process Sampler. But getting below error always :

Response message: Exception occurred whilst executing system call: java.io.IOException: Cannot run program "java -jar /User/wasim/Desktop/My_Jar/RunTask.jar " (in directory "/User/wasim/Desktop/jMeter/apache-jmeter-5.1.1/bin"): error=2, No such file or directory

I tried to run jar directly and with full path. I have passed java_home as parameter as well.

This is the request in jmeter interface :

Working Directory: /User/wasim/Desktop/jMeter/apache-jmeter-5.1.1/bin Environment: {JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home} Executing: java -jar /User/wasim/Desktop/My_Jar/RunTask.jar update 20180401


Solution

  • i solved the issue after doing below changes :

    In command section put only "java" then put all your command after java into Command parameter section like below :


    -jar
    RunTask.jar
    update
    20180401

    Make sure all remaining command should be in separate line without any space in the end.

    Happy learning.