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/)...
I fixed and recompiled the Native DLL for JSSC which was causing Access Violation crashes when attempting to open a serial port on Windows 10 64 bit systems with newer Java versions. With Java 8 x64, it was hit and miss. One system crashed while another did not. x32 always worked of course...
www.b4x.com
Just downloaded the jssc.jar posted by the user techknight, then overwrite the one in the jSerial folder where the B4J program was pointing to (it points via Tools => Configure Paths => Additional Libraries).
Sorry @rvalongo but I respectfully suggest that you are wasting your time applying that "old" solution because I'v been down that path (and some similar ones) when I suffered the same problem with my own applications using jSerial. The solution provided by @Erel at Tips and special cases 5. in this post Integrated B4JPackager11 - The simple way to distribute standalone UI apps was a blessing which is a persistent solution on any computer on which you use the exe to install the app on.
As per that post just put the attached jssc.dll file in the project folder and add:
B4X:
#CustomBuildAction: After Packager, %WINDIR%\System32\robocopy.exe, ..\ temp\build\bin\ jssc.dll