Java OS X Lion Set application name doesn't work

后端 未结 6 1921
独厮守ぢ
独厮守ぢ 2020-12-05 07:11

I\'m trying to change the application name displayed into the menu bar of OS X but i can\'t succeed with that. I have tried settings as the first statement in the main metho

6条回答
  •  没有蜡笔的小新
    2020-12-05 07:37

    Using JDK8, you can set the apple.awt.application.name property to affect the Application menu name.

    However, Martijn Courteaux’s warning still applies: you must do this before any AWT classes are loaded. And AWT classes will be loaded before your main() method runs if it lives in a subclass of JFrame.

    Reference:

    http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/5c1d06cd7d7b/src/macosx/native/sun/osxapp/NSApplicationAWT.m#l157

提交回复
热议问题