Skip to main content

Problem with Runtime.exec on Mac

No replies
Joined: 2008-05-03

Hi folks;
I am trying to run a Mac binary from my java application. I am using:
String cmd="\"/My app folder/my binary\"";
Process p=Runtime.getRuntime.exec(new String[]{cmd});
//code that starts two threads to read from output/error streams of the process.

But I never was able to get it to work. It throws;
IOException: "/My app folder/my binary" not found blabla
I am using this on Windows and runs perfect. I tried to put quotes, remove them, passing the a string and string array. It never worked for me on Mac.
Any ideas? Thank you