Skip navigation
Tomas_Mirezko
Currently Being Moderated

How to start Flash from Java on Mac OS X?

Dec 6, 2012 5:44 AM

Tags: #java #flash #jsfl

I am creating a cross platform script in Java that will start Flash and execute some JSFL scripts.

 

I found this article http://www.mikechambers.com/blog/2004/02/20/executing-jsfl-from-the-co mmand-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();

 

So my question is: How to start Flash from Java on Mac OS X?

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points