Error starting a Java Process with ProcessBuilder in Jenkins on windows slave from unix
===

I have a unix machine running Jenkins master, and I have also configured a windows slave. That works nice. But when I run a groovy script using the groovy plugin (in option system groovy script), and use a java.lang.ProcessBuilder to run a maven command, I get this:


    Caused by: java.io.IOException: java.io.IOException: error=2, 
        No such file or directory
    	at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
    	at java.lang.ProcessImpl.start(ProcessImpl.java:65)
    	at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
    	... 122 more
    Build step 'Groovy Postbuild' marked build as failure
    Finished: FAILURE

And the directory which the exception says doesn't exist, actually exists. So my question is; how can I start a maven command using groovy script [see https://mriet.wordpress.com/2011/06/23/groovy-jenkins-system-script/] on a windows slave when the master is running on a unix slave? I find it speculative why I get the exception java.lang.UNIXProcess when I am running the groovy script on windows (the script file itself is located on the same machine as the windows slave, and I also checked from System.getEnv() that JAVA_HOME is correct)

I higly appreciate your help.