How to get Apple Java Extensions (com.apple.eawt) work on JDK 7 and higher?

后端 未结 4 1866
情书的邮戳
情书的邮戳 2020-12-10 14:30

TL;DR: Apple has dropped native feature support in Java. Especially touchpad gestures are not working any longer. I wrote a library that does the job using

4条回答
  •  离开以前
    2020-12-10 15:13

    I just happened to run across your question and noted that it has not been answered yet. I have a Java program that I have been developing on the Mac, and noted that when I ran it under Java 7, the menu bar, Preferences, Quit and About all worked fine using rt. jar in the program's libraries folder and using a MacAppMenuHandler class that I wrote to provide functionality for those items.

    However, when I switched to Java 8, they no longer worked. I'm not sure what the issue is though reading other web sites today suggest a "permissions" issue in Java 8 regarding these files.

    However, I solved the problem by copying the rt. jar from Java 7 into the program's libraries, and it has continued to work for me while continuing to develop under Java 8.

    I suggest this as one possible solution to the problem.

    Hope this helps.

提交回复
热议问题