osx - How to run a Mac application From Java? -


i tried code below run stand-alone utility app created apple script but, no file or directory exists error.

i put identical copies (for testing) in project, dist, parent directories but, didn't help.

so, questions are: call run app bad (perhaps because it's not windows exe)? how run mac app java?

thanks

private void jbutton1actionperformed(java.awt.event.actionevent evt) {     // todo add handling code here:     runtime r=runtime.getruntime();     process p=null;     string s="mylineininput.app";     try {         p = r.exec(s);     } catch (ioexception ex) {         logger.getlogger(audioswitcherview.class.getname()).log(level.severe, null, ex);     }   } 

a mac app bunde not executable file, it's folder special structure. can opened using open command, passing app bundle path argument: open mylineininput.app.

edit: better using desktop.getdesktop().open(new file("mylineininput.app"));


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -