Add RFID identification to a Java application

If you have an RFID reader module attached to your computer (via a USB serial connection) you can read RFID data from a Java application. For instance, you can use the unique id (Card UID) to identify something or someone.

You can learn how to build you own RFID reader here.

To use serial communication in Java you need a library like RxTx. In Eclipse, you can also install their plugin.

Once you have the library installed you can use this application as an example (extract the zip-file and import it into Ecplise via File > Import > Existing projects into Workspace).

The example consists of a class SerialComm which handles the communication and a class SerialGUI which is a simple userinterface with a label which shows a welcome message if a know RFID is scanned:

rfid_id_java_code1