Hide Java application from command-tab application switcher and dock in OSX

此生再无相见时 提交于 2019-11-29 19:54:09

问题


I have a java application which has a tray icon in the top menu bar of OSX. When I minimize the application I would like it to disappear from the dock and the command-tab application switcher and only be in the tray. I've seen other OSX applications do this, so I do believe it is possible, but as a newbie to OSX I have no idea how to achieve it.

Any help would be appreciated!


回答1:


As it turns out, SWT 3.5 had a bug which prevented it from properly reacting to the Info.plist that OSX requires to hide the application. This bug is fixed in SWT 3.6, and with Eclipse Helios being released today, I believe SWT is now officially at version 3.6

To achieve the hidden icon, at the top of your info.plist file you simply need to add the following line:

<key>LSUIElement</key>
<true/>


来源:https://stackoverflow.com/questions/2995625/hide-java-application-from-command-tab-application-switcher-and-dock-in-osx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!