Closed Jedimaster4559 closed 1 year ago
Please see beginning of the documentation: https://github.com/Fazecast/jSerialComm#usage
If you intend to use the library in multiple applications simultaneously, please make sure to set the fazecast.jSerialComm.appid property before accessing the SerialPort class so that applications don't accidentally delete each others' temporary files during boot-up:
System.setProperty("fazecast.jSerialComm.appid", "YOUR_APPLICATION_IDENTIFIER")
Hallo,
An "app.id" would not help if you try to run the same application in multiple instances (my be with diffrenet users).
I would suggest to include the process id (pid) in the directory name.
Martin
You can set any app ID you want, you can include in it the current user's name, the application's PID, the current timestamp, ... - anything that fits your requirements.
Yes, closing this issue, as @NorbertSandor's suggestions are spot on. Thanks!
Overview
When running on Linux, jSerialComm creates a temporary directory:
/tmp/jSerialComm
. This directory is created with permissions for the user and group running the process using the jSerialComm library. If another process running on a different user or group attempts to use the jSerialComm library and/tmp/jSerialComm
still exists under the previous user/group, jSerialComm will throw an exception. This usually looks like anjava.lang.UnsatisfiedLinkError
Short Term Fix
I was able to fix this issue by manually deleting the
/tmp/jSerialComm
directory before running the process as a different user.