问题
I am displaying a JFrame on OS X and am getting "java" for the name of the application when it is minimized to the dock. I am passing -Xdock:name="Foo", and this is changing the name in the dock when the application is not minimized, but once we minimize the name in the dock is wrong.
To minimize I am calling setExtendedState(JFrame.ICONIFIED).
回答1:
To get this effect on Mac OS X, you'll need to add the option to your application bundle's Info.plist, as shown in the example cited here.
<key>VMOptions</key>
<string>-Xdock:name=Foo</string>
来源:https://stackoverflow.com/questions/21591491/jframe-minimized-to-dock-name-java