简体   繁体   中英

How to get the list of all available serial ports on linux using java?

我想使用Java 6获取Linux机器上所有可用串行端口的列表

i have used rxtx on windows which worked well. there is a linux version: http://rxtx.qbang.org/wiki/index.php/Installation_on_Linux

The command under Linux is dmesg | grep tty dmesg | grep tty

I think you need to implement the abstract class Process and call the Runtime.exec() method, that returns a Process object.

Please read here and here .

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM