I have to write a program in Java that will display all the COM ports I have on my computer. I'm using the RXTX.Comm library.
I imported it, and while writing the code, the program did not show any errors, but after the compilation in the console showed:
java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver
Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
at javaapplication14.JavaApplication14.listPorts(JavaApplication14.java:19)
at javaapplication14.JavaApplication14.main(JavaApplication14.java:46)
I do not know what's wrong with this error, I have 4 COM ports on my computer that should be displayed.