How to hide the Java SWT program icon in the Dock when the application is in the tray

前端 未结 1 1198
长发绾君心
长发绾君心 2020-12-11 02:46

I know there are a lot of questions similar to mine, but I actually couldn\'t solve my problem even after reading all of them. I have a Java application that as soon as it s

1条回答
  •  难免孤独
    2020-12-11 03:35

    You may be using the wrong property name for what you want. Have a look here:

    https://developer.apple.com/library/mac/#documentation/Java/Reference/Java_PropertiesRef/Articles/JavaSystemProperties.html

    The property you want to set is, I think:

    "apple.awt.UIElement" (not "LSUIElement")

    There are two ways you can do that. You can pass:

    -Dapple.awt.UIElement="true"
    

    as a VM argument, or you can set a property in the Info.plist as:

    Properties
      
        apple.awt.UIElement
        true
      
    

    0 讨论(0)
提交回复
热议问题