Is there a little example of how to write and read a serial port in Java with Windows?
You have to import javax.comm.SerialPort
for this purpose to do, refer to Read from a Serial port to know more information.
-
1FYI: Oracle's implementation of javax.comm no longer appears to only be available for Solaris SPARC, Solaris x86, and Linux x86. It isn't available for Windows, which the original question was about. See oracle.com/technetwork/java/index-jsp-141752.html. – Patrick W Jan 11 '17 at 0:28
I used RXTX library.
Example code can be found here: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port