从命令选项卡应用程序切换器隐藏Java应用程序并在OSX中停靠 [英] Hide Java application from command-tab application switcher and dock in OSX

查看:126
本文介绍了从命令选项卡应用程序切换器隐藏Java应用程序并在OSX中停靠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个java应用程序,在
OSX的顶部菜单栏中有一个托盘图标。当我最小化应用程序时,我希望它从
中消失,Dock和命令选项卡应用程序切换器以及位于
托盘中。我已经看到其他OSX应用程序这样做,所以我相信它可能是
,但作为OSX的新手我不知道如何实现它。

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.

任何帮助将不胜感激!

推荐答案

事实证明,SWT 3.5有一个错误,阻止它正确地做出反应OSX要求隐藏应用程序的Info.plist。这个错误在SWT 3.6中修复,并且今天发布了Eclipse Helios,我相信SWT现在正式版本为3.6

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

要实现隐藏的图标,请在顶部您的info.plist文件,您只需添加以下行:

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/>

这篇关于从命令选项卡应用程序切换器隐藏Java应用程序并在OSX中停靠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆