B4J Question [SOLVED] PDFBoxWrapper issue

vfafou

Well-Known Member
Licensed User
Longtime User
Hello!
I'm intended to use PDFBoxWrapper (https://www.b4x.com/android/forum/t...-show-pdf-document-in-b4j.103350/#post-647789) to show PDF files into my B4XPages application.
The example provided by knutf, is working like a charm!
When I use the wrapper class into my application, it raises the following error:
B4X:
java.lang.RuntimeException: java.lang.ClassNotFoundException: javafx$embed$swing$SwingFXutils
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:140)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:98)
    at anywheresoftware.b4a.keywords.Common$3.run(Common.java:1118)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
    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:832)
Caused by: java.lang.ClassNotFoundException: javafx$embed$swing$SwingFXutils
    at anywheresoftware.b4j.object.JavaObject.getCorrectClassName(JavaObject.java:289)
    at anywheresoftware.b4j.object.JavaObject.InitializeStatic(JavaObject.java:75)
    at vf.medappcrm.pdfbox._initialize(pdfbox.java:244)
    at vf.medappcrm.fvisits$ResumableSub_initialize.resume(fvisits.java:3597)
    at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:156)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:105)
    ... 9 more
I use OpenJDK 14.0.1 provided by Erel and I have configured the Java path correctly!
I can't figure out what's wrong!

UPDATE
I was initializing the class with the wrong callback object.
 
Last edited:
Top