1. Check Java comm API 2.0. There is no windows version in 3.0. I do not know why.
Http://www.oreilly.com.tw/bookcode/java_io/javacomm20-win32.zip
2. Copy win32com. DLL to your \ bin directory.
C: \> copy c: \ commapi \ win32com. DLL to c: \ jdk1.1.6 \ bin
3. Copy comm. jar to your \ lib directory.
C: \> copy c: \ commapi \ comm. Jar c: \ jdk1.1.6 \ Lib \ ext
4. Copy javax. Comm. properties to your \ lib directory.
C: \> copy c: \ commapi \ javax. Comm. properties c: \ jdk1.1.6 \ Lib
PS: The javax. Comm. properties file must be installed. If it is not, no ports will be found by the system.
5. Run Test Program
Java blackbox
PS: the Java platform classes are RT under the JRE/lib/directory of the Java security program. jar, and the third component (third-party) outside the producer can be placed in/JRE/lib/EXT/, so Comm. jarIt must be placed in ext and cannot be found in Lib.
When "import" is used, it is to tell the publisher which package their classes are located in, and these classes must be configured with classpath before they can be found by the uploader, the setting is Rt under JRE/lib. jar, JRE/lib/EXT.