How to set up the Java plug-in at UT

This document will help you set up Netscape 4 on the UT Linux machines so that it will be able to use the Java plugin.

Note that both Netscape 6.x and Mozilla are maintained in /public and they already have support for the Java plug-in. Your easiest option may just be to use them! Simply type /p/bin/mozilla and off you go.

1. What the Java plug-in is

Most browsers support Java directly, but typically only older versions and with no support for Swing. The Java plug-in, distributed by Sun, allows your web browser to display Swing and Java2 applets directly (this is why the plug-in is also sometimes called the "swing plug-in"). It is available at http://java.sun.com/products/plugin.

2. How to get it to work

It turns out that the Java plug-in is already available on the UT systems, at /lusr/java2/jre. However the netscape script is set up to disable the Java plug-in by default (to avoid users setting these variables and breaking their Netscape).

Here is what you have to do in order to get the plug-in to work. I believe that this will only work on the i386 Linux machines (for example the ones in the Taylor basement).

Note that these descriptions assume that you know what you are doing. Be careful if you don't, because messing up your path can result in commands like 'ls' not working anymore (in that xterm). So try this locally before modifying your .login!

  1. Add /usr/local/java2/bin to your PATH
  2. Set the environment variable NPX_PLUGIN_PATH to /lusr/java2/jre/plugin (no NOT add a trailing slash!)
  3. Copy /lusr/bin/netscape to your home.
  4. Rename it to netscape-swing
  5. Edit it and comment out the following two lines:
    unset CLASSPATH
    unset NPX_PLUGIN_PATH
    
  6. Close Netscape if it is running at this point
  7. Open Netscape (type ./netscape-swing)
  8. Close it once more (this is important)
  9. Open Netscape (again, ./netscape-swing). Plug-ins should now work!

3. Testing the plug-in

To test the plug-in, you can try the Clock demo or the more elaborate pacman demo, or any of the other Demonstration applets. Enjoy!

If this doesn't work, check your environment variables. Here is what they should be set to:

Acknowledgements

Thanks to John B. Chambers who helped me getting this to work.


Jean-Philippe Martin, last updated Apr. 5, 2002
contact me if you have questions or comments.
Back to JP's homepage