Running the attached (very small) project from the IDE (both Release and Debug modes) works fine (B4J 9.30, OpenJDK 11.0.1). I run it using @agraham 's RunSelfNamedJarJdk11 because I don't need an installer and this keeps the footprint minimal in terms of disc space, as basically it does this (and doesn't need to duplicate the OpenJDK runtime files):
I have tested it with the integrated packager and InnoSetup as well (for the sake of completeness), but then clicking the button has no effect at all. When running it as aforementioned, the below exception is thrown; can anyone tell me what I'm missing/doing wrong?
B4X:
C:\java\jdk-11.0.1\bin\java.exe --module-path c:\java\jdk-11.0.1\javafx\lib --add-modules ALL-MODULE-PATH -jar ShowTemplateError.jar
I have tested it with the integrated packager and InnoSetup as well (for the sake of completeness), but then clicking the button has no effect at all. When running it as aforementioned, the below exception is thrown; can anyone tell me what I'm missing/doing wrong?
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:132)
at b4j.example.customlistview._createlabel(customlistview.java:239)
at b4j.example.customlistview._insertattextitem(customlistview.java:704)
at b4j.example.customlistview._addtextitem(customlistview.java:82)
at b4j.showtemplateerror.b4xlisttemplate$ResumableSub_Show.resume(b4xlisttemplate.java:242)
at b4j.showtemplateerror.b4xlisttemplate._show(b4xlisttemplate.java:179)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:109)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:509)
at anywheresoftware.b4a.keywords.Common.CallSubNew2(Common.java:464)
at b4j.showtemplateerror.b4xdialog$ResumableSub_ShowTemplate.resume(b4xdialog.java:1132)
at b4j.showtemplateerror.b4xdialog._showtemplate(b4xdialog.java:1098)
at b4j.showtemplateerror.main$ResumableSub_Button1_Click.resume(main.java:133)
at b4j.showtemplateerror.main._button1_click(main.java:94)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:109)
at anywheresoftware.b4a.BA$1.run(BA.java:234)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: 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 @542f6078
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:340)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:280)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:198)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:192)
at b4j.example.customlistview.MeasureMultilineTextHeight(customlistview.java:1082)
... 34 more