I am trying to use the early builds of JDK 23 and JavaFX 23, since the latest code base of JavaFX has fixed a bug that really matters to my app.
1. Download the builds from here: https://jdk.java.net/23/, https://jdk.java.net/javafx23/
2. Run the jar with the following command:
I added some parameters after encountering the following problems:
I wonder why I need to add the parameters and what else I need to do to make the B4J app compatible with the latest versions of Java and JavaFX.
1. Download the builds from here: https://jdk.java.net/23/, https://jdk.java.net/javafx23/
2. Run the jar with the following command:
B4X:
G:\jdk-23\bin\java --module-path "G:\javafx-sdk-23\lib" --add-modules javafx.base,javafx.controls,javafx.graphics,javafx.web,javafx.swing --add-opens javafx.controls/com.sun.javafx.scene.control.skin=ALL-UNNAMED --add-exports javafx.base/com.sun.javafx.collections=ALL-UNNAMED -jar .\ImageTrans.jar
I added some parameters after encountering the following problems:
B4X:
java.lang.reflect.InaccessibleObjectException: Unable to make public static double com.sun.javafx.scene.control.skin.Utils.computeTextHeight(javafx.scene.text.Font,java.lang.String,double,javafx.scene.text.TextBoundsType) accessible: module javafx.controls does not "exports com.sun.javafx.scene.control.skin" to unnamed module @1aba25ec
B4X:
error: java.lang.IllegalAccessException: class anywheresoftware.b4j.object.JavaObject cannot access class com.sun.javafx.collections.VetoableListDecorator (in module javafx.base) because module javafx.base does not export com.sun.javafx.collections to unnamed module @3276b83b
StackTrace: java.lang.IllegalAccessException: class anywheresoftware.b4j.object.JavaObject cannot access class com.sun.javafx.collections.VetoableListDecorator (in module javafx.base) because module javafx.base does not export com.sun.javafx.collections to unnamed module @3276b83b
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:398)
at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:709)
at java.base/java.lang.reflect.Method.invoke(Method.java:571)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:132)
I wonder why I need to add the parameters and what else I need to do to make the B4J app compatible with the latest versions of Java and JavaFX.