|
The Terminal Applet Demo
Screen shots (for those who don't want to run the applet) Runs on Linux. This applet will work when a licensed copy of SerialPort 6.0 (Linux x86) or later is present on the Linux x86 machine running the browser. Configure the Linux x86 computer per the instructions included with the SerialPort package. Runs on Mac. This applet will work with Safari, Netscape 7, Camino, when a licensed copy of SerialPort 6.2 (OS X PPC) or later is present on the Mac OS X machine running the browser. Configure the Mac computer per the instructions included with the SerialPort package. The Termlet Demo of the Java SerialPort class provides a very simple terminal Applet that allows you to access the serial ports of your Win32 PC. In order for you to run the demo, you will need a free serial port on your PC. The port could be connected a different serial device like another PC or a free modem (you cannot use the one connecting to the Internet). Remember that if you connect two PCs together you will need a null modem cable between them. Termlet has the following restrictions:
These restrictions do not exist in the SerialPort product. 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. Termlet uses native methods similar to those in the Java SerialPort package access the serial ports on the browser machine, thus is requires native code in the form of DLL(s). Before you can run the Termlet demo you need to perform the following:
Plug-in Policy file To allow Termlet to load the native code to communicate with the serial port on your local machine, you need to edit the Plug-in policy file. (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 using JDK 1.3 or JRE 1.3 with the default settings, this file should be: If you installed the Plug-in using JDK 1.4 or JRE 1.4 with the default settings, this file should be: Note: If you installed the Plug-in via the JDK, do not confuse this file with the one in the JDK i.e. If you also have JDK 1.3 (Java 2) installed on your machine the java.policy file in the JDK folder will have no bearing on the Note: If you also have JDK 1.3 (Java 2) installed on your machine the java.policy file in the JDK folder will have no bearing on the Plug-in security (without modification to the registry). Be certain you modify the java.policy file in the Plug-in folder. (by default in the "Program Files\JavaSoft\JRE\1.3\lib\security\" folder) This is an ASCII file, so you should be able to edit it with virtually any text editor (e.g. vi or Notepad). Add the following lines to the file (e.g. at the top or bottom of the file) and save the changes. Note: This assumes that if you have a local copy of SerialPort on your machine, the files are stored on the C drive. grant codeBase "http://serialio.com/-" { //If there is a local copy of SerialPort on the CLASSPATH or in ../ext 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. Windows Right-click the "java.policy" link below 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 OS X. Ctrl-click the "java.policy" link below and select "Download Link to Disk". This will download the java.policy file to the desktop. Due to the security features of OS X, extra steps must be taken to enable java.policy file changes. Details on java.policy changes with OS X. Download java.policy file to enable Termlet to connect to local serial ports. This will authorize only applet(s) located in http://serialio.com to load native code. Note: The browser must be completely restarted before changes to the java.policy file will take affect. SerialPort Developer Note If you have purchased and installed the SerialPort product, you may get this message when you try to run the demo. java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.jspWin) This is due to the JVM finding the real SerialPort package before it finds the demo. To avoid this error, remove Serialio.jar from the JRE EXT folder, or add permissions to access the jspWin.DLL file. This can be done by duplicating the the lines above for jspWinPiDemo and changing the name to jspWin. The Run Termlet link is designed for the browers with properly integrated Java. Example of browsers with properly integrated Java.
Run TermletUse the Plug-In version with IE, Opera 6, Netscape Communicator 4.5. Using the latest browsers with the above link is recommended. For running on Opera 6, check the Opera notes. IE 6 on Windows XP does not currently appear to work with JRE 1.4.0, try using JRE 1.3. Plug-in upgrade notes. If you have installed Plug-in 1.3, and then on the same machine installed Plug-in 1.4 the above link should work. If you have installed only Plug-in 1.4 on your machine, then use the link below, as the above link is likely to request you download Plug-in 1.3. Run Termlet - Java Plug-In |
