B4J Question B4XFormatter Error

aaronk

Well-Known Member
Licensed User
Longtime User
Hi,

I am using the B4XFormatter with B4J as an non-UI app.

B4J Version: 9.80
Lib Version: 1.03
Java Version: 14

Here is the code I am using (just something basic for testing):

B4X:
#Region Project Attributes
    #CommandLineArgs:
    #MergeLibraries: True
#End Region

Sub Process_Globals
    Dim formatter As B4XFormatter
End Sub

Sub AppStart (Args() As String)
    
    formatter.Initialize
    
    StartMessageLoop
End Sub

When I compile a simple test app using the code above, it comes up with an error as per below:

Waiting for debugger to connect...
Program started.
Error occurred on line: 8 (B4XFormatter)
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:564)
at b4j.example.b4xformatter.innerInitialize(b4xformatter.java:21)
at b4j.example.b4xformatter._initialize(b4xformatter.java:78)
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:564)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:629)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:234)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
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:564)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:100)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:98)
at b4j.example.main.main(main.java:29)
Caused by: java.lang.NoClassDefFoundError: javafx/scene/Node
at b4j.example.b4xformatter._class_globals(b4xformatter.java:155)
... 21 more
Caused by: java.lang.ClassNotFoundException: javafx.scene.Node
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 22 more

Anyone know what might be wrong ?
 

Daestrum

Expert
Licensed User
Longtime User
Looks like it wants JavaFX

Caused by: java.lang.ClassNotFoundException: javafx.scene.Node
 
Upvote 0
Top