B4J Question [Solved]Mac and jssc

yo3ggx

Active Member
Licensed User
Longtime User
I have a b4j application working as expected on Linux and Windows .
It runs ok on Mac using b4j-bridge.
I build it without errors using MacSigner v1.0.1 on my Mac, but trying to execute run.command I get an error in the console:

jssc:
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)
...

Any idea how to add jssc in this context, as the app runs as expected on the same Mac and using the same java through b4j-bridge?
 

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
 
Upvote 0

yo3ggx

Active Member
Licensed User
Longtime User
I have the line
B4X:
#CustomBuildAction: After Packager, %WINDIR%\System32\robocopy.exe, ..\ temp\build\bin\ jssc.dll

The packaged application (using internal packager in B4J) works perfect on Windows, only on Mac (packaged with MacSigner) I get the error.
 
Upvote 0

yo3ggx

Active Member
Licensed User
Longtime User
The issue seems to be related to MacSigner.
If I run the app on the Mac with
B4X:
jdk-14.0.2.jdk/Contents/Home/bin/java -jar --module-path javafx-sdk-16/lib --add-modules javafx.controls myjar.jar
Is working as expected, with no errors.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Carefully follow these instructions:

1. Open jssc.jar with 7zip and extract osx_64\libjssc.dylib
2. Build a release app and copy it to the Mac (or rename tempjar/AsyncInputX).
3. Click on the Link button in MacSigner.
4. Copy libjssc.dylib to build/lib/
5. Click on the package button.

1636365496686.png
 
Upvote 0

yo3ggx

Active Member
Licensed User
Longtime User
Thank you. Works, with the latest available one (jssc-2.9.4.jar).
Now I have another problem with the MacSigner, but I will post a new thread for it.
 
Upvote 0
Top