open external program from java for mac os x

String[] cmds = {"open",  tempFile.getAbsolutePath(), "-a", "/Applications/Microsoft Office 2011/Microsoft Excel.app"};
Runtime.getRuntime().exec(cmds);
This entry was posted in Java, Mac, Office. Bookmark the permalink.