You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2018/12/19 11:51:27 UTC

[Bug 63020] New: Not able to run jmeter through java exec command in console mode.

https://bz.apache.org/bugzilla/show_bug.cgi?id=63020

            Bug ID: 63020
           Summary: Not able to run jmeter through java exec command in
                    console mode.
           Product: JMeter
           Version: 5.0
          Hardware: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: rahul.dhoundiyal0790@gmail.com
  Target Milestone: JMETER_5.1

Hi,

I am not able to run jmeter through java exec command in console mode whereas
it is working fine on Version 3.1.

Refer below command i am using.

Process pro = null;     
pro = Runtime.getRuntime().exec("jmeter.bat -n -t test.jmx");

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63020] Not able to run jmeter through java exec command in console mode.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63020

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|REOPENED                    |RESOLVED

--- Comment #4 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Please don't reopen this bug as it is in no way a bug in JMeter.

For further information, ask on user mailing list.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63020] Not able to run jmeter through java exec command in console mode.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63020

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|JMETER_5.1                  |---

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63020] Not able to run jmeter through java exec command in console mode.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63020

Rahul Dhoundiyal <ra...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #2 from Rahul Dhoundiyal <ra...@gmail.com> ---
Yes It is working on command line. Also my system java version is jdk1.8.0_51.

Whenever i tried to call it through Java program i am not getting any result or
error.
I tried to print using below code.

BufferedReader input = new BufferedReader(new
InputStreamReader(pro.getInputStream()));
 byte[] bytes = new byte[4096];
 String line, output = "";
 while ((line = input.readLine()) != null) {
  output = output + line;
 System.out.println(line);
 }
 input.close();

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63020] Not able to run jmeter through java exec command in console mode.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63020

--- Comment #3 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
To see how to get the required information, look at code here:
https://github.com/apache/jmeter/blob/trunk/src/jorphan/org/apache/jorphan/exec/SystemCommand.java#L131

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63020] Not able to run jmeter through java exec command in console mode.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63020

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om
                 OS|                            |All

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
(In reply to Rahul Dhoundiyal from comment #0)
> Hi,
> 
> I am not able to run jmeter through java exec command in console mode
> whereas it is working fine on Version 3.1.
> 
> Refer below command i am using.
> 
> Process pro = null;	
> pro = Runtime.getRuntime().exec("jmeter.bat -n -t test.jmx");

What is the error you get ?
Most probably wrong version of Java in path (Java 8 is required) or wrong path.
Does it work if you call it from command line.

Please use mailing list for such questions.
Thank you

-- 
You are receiving this mail because:
You are the assignee for the bug.