I have one xml
file. I want to pass the xml
content into java command line argument.
abc.xml :
<a>
<block1>abc</block1>
<block2>xyz</block2>
<block3>pqr</block3>
</a>
Below is my groovy
/java
code to get data from file and pass it into java command line argument.
File fl = new File("PATH/abc.xml")
String filecontent = fl.getText()
String cmd = "Java -cp abc.jar package.CLASSNAME "+filecontent
Process proc = Runtime.getRuntime().exec(cmd);
proc.waitFor()
This command is not executing just comes out of process. Why??