F fabton1963 Member Licensed User Longtime User Jul 31, 2022 #1 if I start my appication.jar using folowing commandline Code: Copy c:\java\jdk-11.0.1\bin\java.exe --module-path c:\java\jdk-11.0.1\javafx\lib --add-modules=javafx.controls,javafx.fxml,javafx.web -jar myapp.jar runs without any errors, but if I build a Package the application does not start and I get the following error Code: Copy main._btnopen_action (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.SerialPort.<init>(Unknown Source) at b4j/anywheresoftware.b4j.serial.Serial.Open(Unknown Source) at b4j/b4j.example.main._btnopen_action(Unknown Source) at b4j/b4j.example.main._appstart(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.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(Native Method) 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) I'm using b4j 9.80 Java: java 11.0.12 2021-07-20 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.12+8-LTS-237) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.12+8-LTS-237, mixed mode) any idea to fix it?
if I start my appication.jar using folowing commandline Code: Copy c:\java\jdk-11.0.1\bin\java.exe --module-path c:\java\jdk-11.0.1\javafx\lib --add-modules=javafx.controls,javafx.fxml,javafx.web -jar myapp.jar runs without any errors, but if I build a Package the application does not start and I get the following error Code: Copy main._btnopen_action (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.SerialPort.<init>(Unknown Source) at b4j/anywheresoftware.b4j.serial.Serial.Open(Unknown Source) at b4j/b4j.example.main._btnopen_action(Unknown Source) at b4j/b4j.example.main._appstart(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.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(Native Method) 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) I'm using b4j 9.80 Java: java 11.0.12 2021-07-20 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.12+8-LTS-237) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.12+8-LTS-237, mixed mode) any idea to fix it?
agraham Expert Licensed User Longtime User Jul 31, 2022 #2 Forum search is your friend. Possibly this thread, post #102. jSerial library The jSerial library allows you to open and communicate with other devices through the computer COM ports. It can also be used to communicate with Bluetooth devices over a virtual com port. (jBluetooth library is now available: https://www.b4x.com/android/forum/threads/jbluetooth-library.60184/)... www.b4x.com Upvote 0
Forum search is your friend. Possibly this thread, post #102. jSerial library The jSerial library allows you to open and communicate with other devices through the computer COM ports. It can also be used to communicate with Bluetooth devices over a virtual com port. (jBluetooth library is now available: https://www.b4x.com/android/forum/threads/jbluetooth-library.60184/)... www.b4x.com
jahswant Well-Known Member Licensed User Longtime User Jul 31, 2022 #3 I also found this problem when I updated to the latest version of B4J. Seems like the Command to copy the jssc.dll is not executed. I had to copy manually to the bin folder after creating the package. Upvote 0
I also found this problem when I updated to the latest version of B4J. Seems like the Command to copy the jssc.dll is not executed. I had to copy manually to the bin folder after creating the package.
jahswant Well-Known Member Licensed User Longtime User Jul 31, 2022 #4 B4X: Copy #CustomBuildAction: After Packager, %WINDIR%\System32\robocopy.exe, ..\ temp\build\bin\ jssc.dll Please can someone verify on their side if this command works well. Upvote 0
B4X: Copy #CustomBuildAction: After Packager, %WINDIR%\System32\robocopy.exe, ..\ temp\build\bin\ jssc.dll Please can someone verify on their side if this command works well.
Erel B4X founder Staff member Licensed User Longtime User Jul 31, 2022 #5 Moved to the questions forum. See tip #5: https://www.b4x.com/android/forum/t...distribute-standalone-ui-apps.117880/#content Upvote 0
Moved to the questions forum. See tip #5: https://www.b4x.com/android/forum/t...distribute-standalone-ui-apps.117880/#content
F fabton1963 Member Licensed User Longtime User Jul 31, 2022 #6 Solved with your suggestion, thanks. Upvote 0
bdunkleysmith Active Member Licensed User Longtime User Jul 31, 2022 #7 @jahswant I have found sometimes B4X: Copy #CustomBuildAction: After Packager, %WINDIR%\System32\robocopy.exe, ..\ temp\build\bin\ jssc.dll did not copy jssc.dll and so had to copy it manually. I raised this issue in this post where I suspect it is due to the delay on my machine of completing the copying of that file to temp\build\bin\ before the InstallerScript.iss script is run. Upvote 0
@jahswant I have found sometimes B4X: Copy #CustomBuildAction: After Packager, %WINDIR%\System32\robocopy.exe, ..\ temp\build\bin\ jssc.dll did not copy jssc.dll and so had to copy it manually. I raised this issue in this post where I suspect it is due to the delay on my machine of completing the copying of that file to temp\build\bin\ before the InstallerScript.iss script is run.