| Home | Products | Store | Downloads | Services | Support | Contact |
Contact Us
Java Ring Business Card Applet Demo

The BizRing applet demonstrates the power the Java SerialPort javax.comm.SerialPort implementation to provide smart card interface functionality to the Java Ring. The Java Ring uses iButton technology from Dallas Semiconductor.

In order to run the demo, a "Blue Dot Reader" must be connected to a serial port on your PC. Information on Java Rings, and readers can found here.

This demo requires the following:

  • You must have the Java Plug-in 1.2 or later installed (1.2.2 or later if using IE5)
  • Currently runs only under WindowsNT/98/95.

A ring (smart card) reader application could operate on any platform supported by SerialPort.


How It Works

Java technology is based on Virtual Machine (VM) technology (or was initially at any rate), therefore any access to hardware must be provided via native methods. Native methods are built into Java implementations to provide access to hardware such as the video memory, the sound card, and the mouse. Java suppliers, do not provide the native methods needed for serial port access.

BizRing uses native methods similar to those in the Java SerialPort package to access the serial ports on the browser machine, thus requires native code in the form of a DLL / shared library.


Before you can run the BizRing demo you need to perform the following:

  • Have the BusinessCard 'RingLet' load into the Java Ring. The BusinessCard 'RingLet' (also known as a 'jibLet') is included with the iButton developer kit.
  • Download jspWinPiDemo.zip and copy the DLL in it jspWinPiDemo.zip to WinNT\System32 (Windows NT) or Windows\System (Windows 95/98).
  • Edit your Plug-in policy file (see below), or use the supplied policy file in the above downloaded zip. Restart the browser after editing the policy file.
  • Download ocJars.zip and copy the JARS in it the Java Plug-in ext folder. (the default is C:\Program Files\JavaSoft\JRE\1.2\lib\ext). Note: if you have installed the iB-IDE you only need to install the jspComm.jar file into the ext folder.

Note: Although the applet could be configured to run without installing the JAR files locally, it is not practical over a dialup connection because of the number of class files that are used.


Plug-in Policy file

BizRing sets the Java properties to indicate what serial port the ring (smart card) reader is attachecd to. It also loads the native code to communicate with the ring (smart card) reader via the serial port. To authorize BizRing to perform these functions, you need to edit the Plug-in policy file.

Note: editing this file should not be required in the future when the
Java Plug-in is properly supported by Certification Authorities.

If you installed the Plug-in with the default settings this file should be:
C:\Program Files\JavaSoft\JRE\1.2\lib\security\java.policy

This is an ASCII file, so you should be able to edit it with virtually
any text editor (e.g. Windows Notepad). Add the following line to the
file (e.g. at the top or bottom of the file) and save the changes.

grant codeBase "http://serialio.com/-" {
permission java.lang.RuntimePermission "loadLibrary.*";
permission java.util.PropertyPermission "*", "read";
permission java.util.PropertyPermission "*", "write";
permission java.lang.RuntimePermission "modifyThread";
};

If you have not made previous changes to your Java plug-in policy file you can download the default policy file with the above change added. Right-click here and select "Save Link As" or "Save Target As", then select the directory where your Java Plug-in policy file is installed. (the default is C:\Program Files\JavaSoft\JRE\1.2\lib\security).

This will authorize only applet(s) located in http://serialio.com
to perform these functions.

Note: A version of the policy file with the required changes is included in the ZIP archive containing the DLL (discussed above). This version is a copy of the default java.policy file created during the Java Plug-in 1.2 installation, with only the policy changes shown (added at the top of the file).


javax.comm.SerialPort

The ring (smart card) reader software relies on javax.comm.SerialPort. The javax.comm.SerialPort assumes 'port discovery' to be supported on the target platform (i.e. you can't issue commands like "open COM2", or "open /dev/ttyR0"). The implementation of javax.comm.SerialPort that uses SerialPort is adequately flexible to allow forcing the use of named port, the Sun implementation may not be. Therefore this demo may only run using the SerialPort implementation of javax.comm.SerialPort.

When the Java Plug-in 1.2 runs, the local CLASSPATH setting will be searched first, and if the Sun implementation is found, the demo won't run properly. If you have installed the Sun Comm API implementation, you may need to slightly modify your CLASSPATH setting to assure the SerialPort implementation is used. This is normally done by removing the comm.jar entry in CLASSPATH.

Note: For software that runs from the local disk (i.e. not an applet) the smart card software will search for a file on the local drive called opencard.properties. This file will tell the software what port the reader is on. Because this demo does not require the installation of the smart card software, it needs to force the use of the named port.


This applet works best with these versions or later - Netscape Communicator 4.7, Internet Explorer 5.0.

If you have the Java Plug-in 1.2.2 or later installed and have performed the above steps, click below to run the demo.

Run BizRing