B4J Question B4J OpenJDK 11 Exception

XbNnX_507

Active Member
Licensed User
Longtime User
Hi everyone, i'm receiving this error when trying to run a jar file from command line using openjdk 11 downloaded from https://www.b4x.com/b4a.html
./java --module-path D:\jdk-11.0.1\javafx\lib --add-modules=javafx.controls -jar myApp.jar.


Error:
b4xpagesmanager._createpageifneeded (java line: 306)
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalAccessError: class anywheresoftware.b4a.objects.B4XCanvas$B4XPath (in unnamed module @0x2f1e32bc) cannot access class com.sun.javafx.geom.Path2D (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.geom to unnamed module @0x2f1e32bc
        at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:518)
        at anywheresoftware.b4a.keywords.Common.CallSubNew2(Common.java:464)
        at b4j.example.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:306)
        at b4j.example.b4xpagesmanager._showpage(b4xpagesmanager.java:721)
        at b4j.example.b4xpagesmanager._addpage(b4xpagesmanager.java:118)
        at b4j.example.b4xpagesmanager._addpageandcreate(b4xpagesmanager.java:125)
        at b4j.example.b4xpagesmanager._initialize(b4xpagesmanager.java:490)
        at b4j.example.main._appstart(main.java:101)
        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.raiseEvent(BA.java:96)
        at b4j.example.main.start(main.java:37)
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
        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.RuntimeException: java.lang.IllegalAccessError: class anywheresoftware.b4a.objects.B4XCanvas$B4XPath (in unnamed module @0x2f1e32bc) cannot access class com.sun.javafx.geom.Path2D (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.geom to unnamed module @0x2f1e32bc
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:138)
        at anywheresoftware.b4j.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:85)
        at anywheresoftware.b4j.objects.LayoutBuilder.loadLayout(LayoutBuilder.java:110)
        at anywheresoftware.b4j.objects.PaneWrapper.LoadLayout(PaneWrapper.java:101)
        at anywheresoftware.b4a.objects.B4XViewWrapper.LoadLayout(B4XViewWrapper.java:503)
        at b4j.example.b4xmainpage._b4xpage_created(b4xmainpage.java:42)
        at b4j.example.b4xmainpage.callSub(b4xmainpage.java:100)
        at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:493)
        ... 23 more
Caused by: java.lang.IllegalAccessError: class anywheresoftware.b4a.objects.B4XCanvas$B4XPath (in unnamed module @0x2f1e32bc) cannot access class com.sun.javafx.geom.Path2D (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.geom to unnamed module @0x2f1e32bc
        at anywheresoftware.b4a.objects.B4XCanvas$B4XPath.InitializeRoundedRect(B4XCanvas.java:379)
        at b4j.example.swiftbutton._draw(swiftbutton.java:167)
        at b4j.example.swiftbutton._base_resize(swiftbutton.java:68)
        at b4j.example.swiftbutton._designercreateview(swiftbutton.java:145)
        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)
        ... 30 more
 
Top