-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[native-image] ClassCastException when using SystemTray #3414
Comments
Closing this as there is no activity in the last 30 days, |
Facing same issue. @pquiring did you solve it? Is there any updates or maybe you've found any workaround? |
No, problem persists. I've even opened ticket with JDK to get them to fix it there. No change. |
@pquiring Thanks for your answer! Shall we open new issue? Maybe the'll pay attention to it now... |
@n1kub - I opened several tickets against the JDK itself, one was just last month. |
@pquiring I found only this one |
Yes. |
I've created a fix (hack) around this issue. It works! https://github.com/pquiring/labs-openjdk-20/releases/tag/fix-001 |
@pquiring, try using JPopupMenu and JMenuItem... this displays correct labels. |
Unfortunately TrayIcon does not support JPopupMenu. There is a workaround using addMouseListener() but my hack disables mouse events. |
OK, I didn't use your hack, I only use the dev version graalvm-community-openjdk-17.0.7+4.1 and get bad language, than I changed to JPopupMenu with the workaround and it's working for me. |
The latest graal 23.1.0 dev builds have fixed this issue. See #6524 |
I still have the issue right now, can you please provide the hack you used to get this working? @pquiring |
graal 23.1.0 should work now, no need to 'hack' it. |
Describe the issue
Getting ClassCastException when using a SystemTray icon.
Steps to reproduce the issue
Sample code:
Describe GraalVM and your environment:
More details
Exception:
NOTE : You must copy
${java.home}\lib\*font*
to.\lib
Making great progress with AWT!
The text was updated successfully, but these errors were encountered: