-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add java AWT support #2545
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
Comments
TruffleSqueak uses AWT in JVM mode and we replace the display infrastructure with an SDL2 backend when AOT compiling with native image: |
This seems promising for my needs and assuming I understood correctly, I will need to replace any AWT use in my project with de.hpi.swa.trufflesqueak.aot before creating the native image
|
There's no direct mapping, you have to substitute your AWT-based components with an alternative SDL implementation. Here're TruffleSqueak's substitutions: https://github.com/hpi-swa/trufflesqueak/blob/6847f0220af9d65e352ffe1709b3cd2c3a48e664/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/aot/SqueakDisplaySubstitutions.java#L51
Yes, but the binary will depend on SDL (which is available for different platforms). So that means users must install it on their system. I'd consider this approach a workaround until AWT is fully supported by native image. I assume, however, that this will take some time unless someone really needs and builds it. |
this feature request must be submitted to the substrate VM team but I don't know where can I do that
add java AWT support
the feature is related to the IllegalArgumentException that occurs when you try to run a native image of an AWT based java app that was compiled with GraalVM
java.lang.IllegalArgumentException: AWT is currently not supported on Substrate VM
the native image gets generated correctly and the exception would be thrown in run time whenever you try to use a java AWT function.
anyone who uses java AWT to develop desktop applications with java, and more generally anyone who needs a feature that is supported by java AWT and not JavaFX yet (adding system tray icons, for instance, or displaying system notifications are features that are not (yet) implemented in JavaFX and a developer has to use the said functionalities from AWT)
The text was updated successfully, but these errors were encountered: