com.apple.eawt - what exactly I should install

前端 未结 3 1523
温柔的废话
温柔的废话 2020-12-03 21:40

I\'m using Max OS X Mountain Lion, java -version returns \"1.6.0_37\". But I cannot compile project with com.apple.eawt.* classes imported.

What I have to install t

3条回答
  •  醉梦人生
    2020-12-03 22:39

    Solution for Java 9 and later

    In JDK 9, internal APIs such as those in the Mac OS X com.apple.eawt package will no longer be accessible.

    see: http://openjdk.java.net/jeps/272

    com.apple.eawt has been replaced.
    Some of the features are covered here: https://docs.oracle.com/javase/9/docs/api/java/awt/Taskbar.html

    An example implementation of setting the dock icon in mac os can be found here:
    https://stackoverflow.com/a/56924202/5276779

提交回复
热议问题