-
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 java.awt.TrayIcon #6659
Comments
The only proper way to fix this is to make java.awt.TrayIcon extend java.awt.Component. |
As far as I understand, it was extended until ~2005-2007, but then they removed it. So I think there should be some other solution for this. |
I'm not sure, but this issue seems to be related to JDK-2162580 |
Thank you for reaching out about this. |
@pejovica do you think we can do something about this issue from Graal's side? |
@oubidar-Abderrahim that seems to be native-image error, because nothing raised if run jar with graalvm |
BTW I was trying to add as much awt classes as I can to reflect-config and jni-config, but it doesn't help |
Here is my last attempt. I tried to insert it to both reflect-config and jni-config
|
It doesn't happen when run with normal JVM because the native code just ignores the exception. But Graal handles exceptions in native code differently. |
@pquiring so why can't we handle it and ignore in graal way? Do you have any idea about how graal does it? |
I'm not sure if graal can be made to ignore native exceptions, best to ask graal devs. |
That's question to @pejovica and @oubidar-Abderrahim though |
This has actually already been fixed on master by #6524. |
@pejovica @oubidar-Abderrahim still facing the same issue with latest graalvm 23.0.0 |
You could download a nightly build at https://github.com/graalvm/graalvm-ce-dev-builds/releases |
The latest graal 23.1.0 dev builds have fixed this issue. See #6524 |
related to #4921 |
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:
The text was updated successfully, but these errors were encountered: