jcolen19
jcolen19

Reputation: 318

RXTX getPortIdentifiers() returns empty

I'm trying to write a program to have an Arduino Uno communicate with a Java program via the Serial Port. I followed the instructions from here (http://playground.arduino.cc/Interfacing/Java). When I try to run the code, the output is "Could not find COM port". When I looked further, I noticed that getPortIdentifiers() is returning an empty enumeration.

I've already tried multiple solutions (RXTX cannot list or find ports under windows 7 64 bits, http://www.coderanch.com/t/535173/java-io/java/CommPortIdentifier-getPortIdentifiers-empty) but none have worked.

I'm running 64-bit Windows 8.

Thanks in advance.

Upvotes: 2

Views: 1745

Answers (1)

code_poetry
code_poetry

Reputation: 341

EDIT: Steps for using RXTX for serial communication are -

  1. Copy RXTXcomm.jar, rxtxSerial.dll and rxtxParallel.dll files to the lib directory of your project
  2. Expand the RXTXComm.jar entry in the list and select "Native Library Location" and Select the project lib directory.

rxtxSerial.dll is for windows which restricts your application work only on windows. Use of JSSC lib can make it cross platform application.

If you are still using RXTX lib, there can be "permission" issue for getPortIdentifier returning empty.

Upvotes: 2

Related Questions