How to run a Mac application From Java?

后端 未结 1 1363
迷失自我
迷失自我 2020-12-06 19:40

I tried the code below to run a stand-alone utility app I created from Apple script but, I get a No File or Directory Exists error.

I put identical copies (for testi

相关标签:
1条回答
  • 2020-12-06 20:19

    A Mac App Bunde is not an executable file, it's a folder with a special structure. It can be opened using the open command, passing the App Bundle path as an argument: open MyLineInInput.app.

    EDIT: Even better would be using Desktop.getDesktop().open(new File("MyLineInInput.app"));

    0 讨论(0)
提交回复
热议问题