Hi everyone.
To convert centimeters to pixels, I use the following routine:
This works fine with OpenJDK 14.x.
However, with OpenJDK 19.x, I get the following error when running:
java.lang.IllegalAccessException: class anywheresoftware.b4j.object.JavaObject cannot access class sun.awt.windows.WToolkit (in module java.desktop) because module java.desktop does not export sun.awt.windows to unnamed module @6224ccc0
at
I have not found any indication that the awt.toolkit has changed in openjdk 19.x.
Can anyone help me?
Many thanks to the readers.
To convert centimeters to pixels, I use the following routine:
B4X:
Private Sub GetPixelProCm As Int
Dim jo As JavaObject
jo.InitializeStatic("java.awt.Toolkit")
jo = jo.RunMethod("getDefaultToolkit",Null)
Return Floor(jo.RunMethod("getScreenResolution",Null)/2.18)
End Sub
This works fine with OpenJDK 14.x.
However, with OpenJDK 19.x, I get the following error when running:
java.lang.IllegalAccessException: class anywheresoftware.b4j.object.JavaObject cannot access class sun.awt.windows.WToolkit (in module java.desktop) because module java.desktop does not export sun.awt.windows to unnamed module @6224ccc0
at
B4X:
jo.RunMethod("getScreenResolution",Null)
I have not found any indication that the awt.toolkit has changed in openjdk 19.x.
Can anyone help me?
Many thanks to the readers.