Using 10.8 Notification Center in Java

后端 未结 4 1387
遇见更好的自我
遇见更好的自我 2020-12-29 07:06

this is just a general question. I\'m not having an actual project or something else where I want to do this. Is it possible to build an App in Java and add some framework s

4条回答
  •  隐瞒了意图╮
    2020-12-29 07:20

    I' ve found a solution that might work for you, you can use Apple script to show notifications on osx, try this:

    Runtime.getRuntime().exec(new String[] { "osascript", "-e", "display notification "This is a message" with title "Title" subtitle "Subtitle" sound name "Funk"" });
    

    You can read about Apple script's notifications in here

提交回复
热议问题