After the above problems are solved, the focus is on how java can be a serial assistant. As we all know, java runs on a virtual machine, that is, on a window process. If java wants to read and write a serial port, it must be driven, not just loaded with a jar package.
Fortunately, Sun solved the problem for us. You can download the compressed package of Java com 20-win32. zip from sun's website, which contains the serial port driver (. Dll file) and the corresponding jar package. After downloading, will. Dll file, through the api provided by jar package, can operate the interface related to serial port. Here is an article about the use of java serial port, which I hope can be provided to you:/kabini/article/details/1601324.