Consider the following script:
println "ls -l".execute().text
Why do I get the following error when running with JDK 1.6.0_14?
Caught: java.io.IOException: Cannot run program "ls": java.io.IOException: error=40, Too many levels of symbolic links
at a.run(a.groovy:2)
When run with JDK 1.5.0_08 I get the expected output. This, by the way, is one of the examples on the Groovy Process management page. A simple solution seems to be to run it within a shell:
println ["/bin/sh", "-c", "ls -l"].execute.text
But this shouldn't be necessary, no?