I am creating a cross platform script in Java that will start Flash and execute some JSFL scripts.
I found this article Executing JSFL from the Command Line on OS X
Works from command line
osascript -e 'tell application "Flash" to open posix file "/var/...tmp/sample.jsfl"'
Does not work from Java, like this:
String flashExe = "Flash";
String jsflFile = "/var/...tmp/sample.jsfl";
MessageFormat osascriptFormat = new MessageFormat("''tell application \"{0}\" to open posix file \"{1}\"''");
String osascript = osascriptFormat.format(new Object[]{flashExe, jsflFile});
String[] commands = new String[]{"osascript", "-e", osascript};
ProcessBuilder pb = new ProcessBuilder(commands);
pb.start();
Question is: How to start Flash from Java on Mac OS X?