You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2018/07/25 15:42:00 UTC

[jira] [Commented] (GROOVY-8714) using process builder in groovy

    [ https://issues.apache.org/jira/browse/GROOVY-8714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16555848#comment-16555848 ] 

Paul King commented on GROOVY-8714:
-----------------------------------

You'll probably get more eyeballs on questions like this on the users mailing list.

I'd try using the consumeProcessOutput method as per the link you gave and see what the error message said. Use {{commands.execute()}} to get your process - then you don't need to worry about getting the runtime either. I'd probably also drop the double slash I think doubling up is only needed for backslash - but that might not be the problem.

> using process builder in groovy
> -------------------------------
>
>                 Key: GROOVY-8714
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8714
>             Project: Groovy
>          Issue Type: Question
>          Components: groovy-jdk
>    Affects Versions: 2.5.1
>            Reporter: Thulsi Doss Krishnan
>            Priority: Minor
>
> Im trying to use the following lines of code found at https://github.com/tthyer/samples/blob/master/groovyProcesses/passEnvVar.groovy
> to run the following piece of code
> def currentPathToLoader="C:/loader/bin/loader.cmd"
> def pathToCsv="C://loader//bin//inputs//loader_test.csv"
> Runtime rt = Runtime.getRuntime()
> String[] commands =["cmd", "/c", "C://loader//bin//loader.cmd", "-Dbase.dir=%cd% -writedbonly -verbose -time -insert -TimeSeriesBackfill 1 inputs/loader_test.csv"]
> Process pr = rt.exec(commands)
> how ever Im unable to do so ? any help would be appreciated



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)