I made a Mac OS X (native) application that writes one line on STDOUT.
In a Java program, I need to launch that application and get what it writes on the standard output.
The following code works for Windows applications but not for Mac OS X apps.
ProcessBuilder pb = new ProcessBuilder(command); Process p = pb.start(); p.waitFor(); BufferedReader is = new BufferedReader(new InputStreamReader(p.getInputStream())); result = is.readLine();
What am I doing wrong ?
Edit: The command is
open -W -n MyApp.app --args myargs