How To Run Mac OS Terminal Commands From Java (Using Runtime?)
I've been looking up ways to run external programs using Java's runtime. This works fine, for instance: String[] cmd = {"mkdir", "test"}; Runtime.getRuntime().exec(cmd); Creates a new directory as you would expect. Now, from a bash window in Mac I can write this: love testgame To run the 'Love' game engine on a folder called testgame. Now, the reason this works is because I've aliased 'love' to call the love executable. I have a feeling that this is the reason that the following does not work: String[] cmd = {"love", "/Users/mtc06/testgame"}; Runtime.getRuntime().exec(cmd); And nor does this