javaexceptionwindows-xprxtxserial-communication

PortInUseException - Java Serial Communication


I’m developing an application for serial communication in Java with RXTX.

Now I’m getting an error:

Port already in use: gnu.io.PortInUseException: Unknown Application

while opening a port, but it seems the port is not used by any other application.


Solution

  • What OS are you using? How did you confirmed that Port is not used by other application? If on windows, go to Device Manager to see if the driver is installed and Port is enabled to be used by applications. I would say if everything looks good, disable the port and re-enable it.