How to read/write a serial port with Java on Windows?

60,812

Solution 1

You have to import javax.comm.SerialPort for this purpose to do, refer to Read from a Serial port to know more information.

Solution 2

You could use RXTX or java.comm.* (examples)

Solution 3

I used RXTX library.

Example code can be found here: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port

Share:
60,812
JBerta93
Author by

JBerta93

I'm a young developer, i know Java SE and i use Java EE to develop a web application, however i know PHP(my first programming language)!I know also Posgresql and Mysql. I had some experience with C/C++ and ASM but my knowledge of this language are basic! I had develop some project with Arduino(using Wiring and C++) and Processing! For my last project i'm using HTML5 and JQuery!

Updated on November 19, 2020

Comments

  • JBerta93
    JBerta93 over 3 years

    Is there a little example of how to write and read a serial port in Java with Windows?