Set LD_LIBRARY_PATH to the directory in which you have the .so file.
Specify the directory where you have the .so /home/abc file
Use this command:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"/home/abc"
In java, download .so as follows.
System.loadLibraryPath("rxtxSerial");
To install it permanently, you must put the same line in the .profile file that will be in your home directory.
you can refer to this guide
source share