Because it is developed under Windows, download http://mdubuc.freeshell.org/Jolt/javacomm20-win32.zip (the complete 2.0 version, as well as examples).
Installation instructions: (The so-called installation here means placing three important files in the specified directory)
After decompressing the downloaded file, there are three necessary files comm.jar in the javacomm20-win32commapi directory. javax.comm.properties and win32comm.dll.
Copy the file comm.jar to %JAVA_HOME%jrelibext;
Copy the file javax.comm. properties to %JAVA_HOME%jrelib;
Copy the file win32comm.dll to %JAVA_HOME%bin.
Note - %JAVA_HOME% is the path of jdk, not jre.
The above note is very important. I have been copying these three files to the directory of javajre before. They are actually jre under jdk. For example, according to the path of my machine, the three files are:
comm.jar is copied to c:Program FilesJavajdk1.6.0_23jrelibext;
javax.comm. properties is copied to c:Program FilesJavajdk1.6.0_23jrelib;
win32comm.dll is copied to c:Program FilesJavajdk1.6.0_2 3bin.
For more articles related to the installation of Java serial port package Javax.comm, please pay attention to the PHP Chinese website!