B4J Question Standalone package not running

Toley

Active Member
Licensed User
Longtime User
I have a small project that I use to control a 3 phases motor. I would like to make it executable but when I run the Build Standalone Package the exe is created but it does not start when I try to open it. I'm using Windows 11 and it's an office desktop with an antivirus (maybe it's why I cannot run untrusted application). I have also made a test with Zed's MarkCraft application and it do not start either. Is it a known issue ? Any workaround ?
 

aeric

Expert
Licensed User
Longtime User
Upvote 0

Toley

Active Member
Licensed User
Longtime User
Thank you @aeric it looks like there is an external library that cannot be loaded. I don't know if it can be fixed.
B4X:
U:\WorkDir\VFD_Project\B4J_Controller\VFD_Controller\Objects\temp\build\bin>java.exe @release_java_modules.txt  -m b4j/b4j.example.main
main._appstart (java line: -1)
java.lang.UnsatisfiedLinkError: Could not load the jssc library: Couldn't load library library jssc
        at b4j/jssc.SerialNativeInterface.<clinit>(Unknown Source)
        at b4j/jssc.SerialPortList.<clinit>(Unknown Source)
        at b4j/anywheresoftware.b4j.serial.Serial.ListPorts(Unknown Source)
        at b4j/b4j.example.main._appstart(Unknown Source)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at b4j/anywheresoftware.b4a.BA.raiseEvent2(Unknown Source)
        at b4j/anywheresoftware.b4a.BA.raiseEvent(Unknown Source)
        at b4j/b4j.example.main.start(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
        at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
        at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
 
Upvote 0

Toley

Active Member
Licensed User
Longtime User
And for Zed's MarkCraft (Only for testing I don't wanna make an executable for it) here is the log
B4X:
b4xmainpage.innerInitialize (java line: -1)
java.lang.NoClassDefFoundError: javafx/scene/web/WebView
        at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
        at java.base/java.lang.Class.privateGetDeclaredMethods(Unknown Source)
        at java.base/java.lang.Class.getDeclaredMethods(Unknown Source)
        at b4j/anywheresoftware.b4a.BA.loadHtSubs(Unknown Source)
        at b4j/b4j.example.b4xmainpage.innerInitialize(Unknown Source)
        at b4j/b4j.example.b4xmainpage._initialize(Unknown Source)
        at b4j/b4j.example.b4xpagesmanager._initialize(Unknown Source)
        at b4j/b4j.example.main._appstart(Unknown Source)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at b4j/anywheresoftware.b4a.BA.raiseEvent2(Unknown Source)
        at b4j/anywheresoftware.b4a.BA.raiseEvent(Unknown Source)
        at b4j/b4j.example.main.start(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
        at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
        at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: javafx.scene.web.WebView
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
        ... 22 more
 
Upvote 0
Top