• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Execute JAR file from within Groovy

Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm completely new to Groovy and have a quick question. I am working with a program called SoapUI and it says it can use Groovy to execute a jar file. I created an executable JAR referenced it below in my Groovy code.

However, I'm not getting any output from within SoapUI and was hoping someone could 1) confirm that I can execute a jar from within a Groovy script and 2) if anyone knew SoapUI what path do I define in order that the test steps section of the project is loaded. Any direction/help would be appreciated. Thanks.

Here is the simple java code within the JAR:

Here is the groovy code that executes the JAR which is located in the soapUI-4.5.2\bin\ext\ directory:

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
def output = process.in.text  is not extracting all the output.. we are able to see only partial outputs.
While running jar file from a command line we are seeing multiple number of lines in the output. But through groovy script we are seeing first line of ouput
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic