RXTX is a cross-platform serial communication component library, which is compatible with SUN's Java (tm) CommunicationAPI standard (except for the package name, the rest are the same), and RXTX is cross-platform, currently, the supported platforms include windows, linux, mac, Solaris, and wince (recompilation required ). In comparison, although sun's CommunicationAPI3.0 standard package also supports linux, solaris, and windows
RXTX is a cross-platform serial Communication component library, which is compatible with SUN's Java (tm) Communication API standard (except for the package name, the rest are the same), and RXTX is cross-platform, currently, the supported platforms include windows, linux, mac, Solaris, and wince (recompilation required ).
In comparison, although the standard component package of sun's Communication API 3.0 also supports linux, solaris, and windows, I chose the open-source RXTX. After all, it is an open-source product, in the future, I plan to migrate the product to the ARM platform. With the RXTX source code, I can compile the RXTX library of a specific platform by myself. This is extremely important.
The following describes how to install and configure RXTX In Ubuntu.
1. Download
RXTX jar packages and libraries can be downloaded at http://users.frii.com/jarvi/rxtx/
At present, the latest version is rxtx-2.1-7-bins-r2, and decompress There Is A RXTXCommon. jar, this jar package is RXTX class library,
In addition, there is a linux/solaris/windows/mac Directory, which is a dynamic link library of RXTX for different platforms.
2. Installation
The installation is simple. You only need to copy several. so files to the jre system directory. However, you must first determine the processor type. RXTX provides
I686-unknown-linux-gnu
Ia64-unkown-linux-gnu
X86_64-unknown-linux-gnu
My processor is i386, so it's the i686-unknown-linux-gnu that comes /Linux/i686-unknown-linux-gnu, put
LibrxtxParallel. so
LibrxtxSerial. so
Copy
/Jre/lib/i386
Directory.
Finally /RXTXCommon. jar is copied to the project and added to the path.
OK. The configuration is complete.
Then I will release the serial communication packaging class I wrote, which is easier to develop.