JavaFX应用程序隐藏OSX停靠图标 [英] JavaFX application hide OSX dock icon
本文介绍了JavaFX应用程序隐藏OSX停靠图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要隐藏javafx应用程序的停靠图标.在普通的Java应用程序中,可以通过以下属性来实现:
I need to hide the dock icon of my javafx application. In a normal java application this can be achieved by the following property:
System.setProperty("apple.awt.UIElement","true");
System.setProperty("apple.awt.UIElement", "true");
但是,这似乎不适用于JavaFX.
However, this does not seems to work with JavaFX.
谢谢!
推荐答案
只需尝试一下.您必须修改* .app/Contents/Info.plist并添加
Just tried it. You have to modify *.app/Contents/Info.plist and add
<key>LSUIElement</key>
<string>1</string>
简单的例子:
<?xml version="1.0" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSUIElement</key>
<string>1</string>
...
对我来说,它适用于捆绑的javaFX应用程序
For me it worked on bundled javaFX apps
这篇关于JavaFX应用程序隐藏OSX停靠图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文