I was looking for ways to run external programs using the Java runtime. This works fine, for example:
String[] cmd = {"mkdir", "test"};
Runtime.getRuntime().exec(cmd);
Creates a new directory, as one would expect. Now from the bash window on Mac, I can write this:
love testgame
Launch the Love game engine in the testgame folder. Now the reason is that I imposed “love” to name the executable text. I got the feeling that this is the reason that the following does not work:
String[] cmd = {"love", "/Users/mtc06/testgame"};
Runtime.getRuntime().exec(cmd);
And does not do this (for those who are wondering):
String[] cmd = {"/bin/bash", "love", "/Users/mtc06/testgame"};
Runtime.getRuntime().exec(cmd);
Without a doubt, this is either some kind of Java idiocy on my part, or some kind of collision with the way aliases work. I pass it on to your venerable intellects, SO!
UPDATE: this does not work either:
String[] cmd = {"/bin/sh", "/Applications/love", "/Users/michaelcook/Desktop/Playout"};
Runtime.getRuntime().exec(cmd);
, , - 127 , Runtime. " ", .