Alien reader java开发1
A Note on Serial Communication
All Alien readers can be operated either via serial communications or over the network.
Networking classes are built into the basic Java language and by combining the
AlienRFID.jar file with a standard Java implementation; all the tools are present to use a
reader over the network. However Java classes for serial communications are not part of
the standard Java distribution. These are available as a no-cost addition from Sun
Microsystems at the following website: http://java.sun.com/products/javacomm/
These serial communications classes (the javax.comm package) must be installed before
an Alien reader can be used over serial ports. Complete instructions for installing the
javax.comm package on a variety of platforms are included in the download. Installation
simply involves placing a handful of files inside your JDK and/or JRE installation.
If the serial classes are not installed, you can still communicate with readers using TCP/IP. In this circumstance, a warning message is issued to stdout when a reader class
is instantiated:
No Serial Ports Available
The Java Class Libraries for Serial Communication are not
present on this machine.
关于串行通信的注意
所有alien的阅读器都是可以通过串行通信和网路通信的。网络相关的类基于标准java语言的,而且标准java实现的时候只要加上AlienRFID.jar的包,所有的网路相关的方法就可以直接用了。然而,对于串行通信的类并不是标准java的一部分。可以从下面的网址免费获取
http://java.sun.com/products/javacomm/
在alien阅读器可以通过串口使用前,必须安装这些串行通信的类(javax.comm包)。完成在多个平台的javax.comm安装包的说明包含在这些下载文件中。简单的安装需要你把一些文件放到你的JDK 和/或JRE安装路径中。如果串行类没有安装,你还是可以使用TCP/IP与阅读器通信。在这种情况下,当一个reader对象被创建时,有个警告信息会输出(如下所示):
No Serial Ports Available
The Java Class Libraries for Serial Communication are not
present on this machine.

浙公网安备 33010602011771号