Headless AWT Support
I understand there is no java.awt UI.
I wonder if the image part can be included?
---> System.NullReferenceException: Object reference not set to an instance of an object. at IKVM.Java.Externs.java.lang.Class.forName0(String name, Boolean initialize, ClassLoader loader, Class caller) at java.lang.Class.forName0(String name, Boolean initialize, ClassLoader loader, Class caller) at java.lang.Class.forName(String className, CallerID ) at java.awt.GraphicsEnvironment.createGE() at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment() at java.awt.image.BufferedImage.createGraphics()
Correct. The AWT stuff is non functional.
Headless graphics should be working and enabled by default though. I don't see an open bug for that specifically, so I'll leave this as it.
AWT related stuff isn't my focus at present. This is an open source project, feel free to contribute.
Headless graphics should be working and enabled by default though. I don't see an open bug for that specifically, so I'll leave this as it.
Reopened, again.
The posted stack-trace is because the property java.awt.graphicsenv is not set (and thus null)
On JVM (on windows) this value is set to sun.awt.Win32GraphicsEnvironment however that class appears to be absent in IKVM
On IKVM you instead have ikvm.awt.NetGraphicsEnvironment, located in the IKVM.AWT.WinForms project.
IKVM.AWT.WinForms however doesn't seem to be compiled as part of build and thus not included and can't be used.
@TheLastRar This is correct. The ikvm.awt code isn't included. It was a old hand-done attempt at an AWT layer against System.WinForms. Neither finished, nor cross platform., nor would it work in Core.
The ultimate goal I have is to finish up feature/nativelib, and include the actual OpenJDK AWT support.
The ultimate goal I have is to finish up feature/nativelib, and include the actual OpenJDK AWT support.
It is now close to a further 8 months. Thanks for so much progress has been made and now the Microsoft team showing interest. Any crystal ball estimation of when the support for OpenJDK AWT would start?
This will be done in a couple of weeks https://github.com/ikvmnet/ikvm/issues/381#issuecomment-2065922797
I did easy adaptation of AWT.WinForms library https://github.com/DjArt/IKVM.AWT.WinForms
@DjArt Thx for sharing
I tested, the headless mode using IKVM 8.8.0 FINALLY work!
AWT support merged into develop branch.