<Swing Dev> taskbar icon badge issue

Alan Snyder javalists at cbfiddle.com
Fri Nov 20 14:56:52 UTC 2020


I don’t believe there is any bug here. Setting a badge on the app icon requires a permission that is controlled using the Notifications system preference.
Using JDK 12, I can allow or prevent the test program from setting a badge by enabling or disabling notifications from “java”.
See linked image [1].

I hope the “fix” can be reverted in JDK 16.

  Alan

[1] https://cr.openjdk.java.net/~alans/8230869/Notifications.png



> On Oct 26, 2020, at 2:29 PM, Sergey Bylokhov <Sergey.Bylokhov at oracle.com> wrote:
> 
> On 26.10.2020 14:16, Alan Snyder wrote:
>>> I have tested the "DockBadge.java" from the https://bugs.openjdk.java.net/browse/JDK-8230869 on macOS 10.15.7 + JDK12 and it does not work =(
>> That seems odd. Are you saying that no dock icons ever show a badge on 10.15.7?
> 
> yes, in some updates it works, in another, it does not.
> 
>> On my 10.15.6, I see dock badges on System Preferences, App Store, and Feedback Assistant. How are they accomplishing this? Do Apple apps use a private API> I’m suspicious that the problem is in the JDK, in which case it should be fixable.
> 
> The Apple standard/public API for dock badges stop working when using with JRS.
> 
> -- 
> Best regards, Sergey.
> 



More information about the swing-dev mailing list