Forum Discussion

pwebb's avatar
pwebb
Occasional Contributor
8 years ago

How to run java command in soapui Groovy?

Can any one tell me how to run a java command from soapui/groovy script

 

I have tried pretty much everything,

 

Command is

def command = "java -cp Task.jar;hbase-assembly-1.1.0.5-SNAPSHOT.jar;conf\\;scala-library.jar Task testDashEnv qa task-prads-1 Data\\hbase\\Portfolio.csv Data\\hbase\\LegalDocument.csv Data\\hbase\\CounterpartyHierarchy.csv Data\\hbase\\InternalEntity.csv"

 

the usual method of running is not working, the command runs from windows command line ok

def proc = command.execute()
proc.waitFor()

 

It returns script-result:1 and I'm sure it is not running

 

Any ideas? spent hours on this!

 

 

 

 

1 Reply

  • nmrao's avatar
    nmrao
    Champion Level 3
    Provide absolute path for the file references. And you may want to use "/" instead of "\\"