java -version outputs to stderr not stdout (also I don't think you need JAVA_HOME /usr/bin/java will do what is needed) On 20/06/2016 15:58, Alexandre Bergel wrote:
On OS X, in a terminal, if I type: /usr/bin/java -version I obtain: java version "1.8.0_66" Java(TM) SE Runtime Environment (build 1.8.0_66-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
Using OSSubProcess, do-it-ing the following:
OSSUnixSubprocess new command: '/usr/bin/java'; arguments: #('-version'); environmentAt: 'JAVA_HOME' put: '/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home'; redirectStderr; redirectStdout; runAndWaitOnExitDo: [ :process :outString | outString inspect ].
inspect an empty string. Any idea whatâs going on?
-- Mark