Java Plugin and HTML Converter Howto

by Larry Arnoldy


Why do I need the Java Plugin?

As of Fall 2000, the current versions of Netscape and Internet Explorer still have a built in Java Virtual Machine (JVM) based upon  the JDK 1.1.x. This JVM does not have any of the Swing libraries. The Java Plugin from Javasoft has a JVM that uses the JDK 1.2.x or higher.


Why must I use the HTML Converter?

The ordinary HTML file with the <APPLET> tag cannot be used to run a Java 2 or Swing applet with Netscape or Internet Explorer. This will start a Java applet using the browsers built in JDK 1.1.x JVM. The HTML file must be converted to use alternate tags and force the browser to use the JVM that is included with the Plugin. See below for instructions on how to do this.


Which Java Plugin and HTML Converter should I download?

I have discovered by trial and error, that if the HTML is converted using the HTML Converter 1.3, then one must use the Java Plugin 1.3. HTML files that have been converted with the 1.3 converter will simply not recognize the Java Plugin 1.2.2. Either it continually asks you to download and install the Plugin or it just sits there and does nothing. The other way around works perfectly, however. If you have installed the Java Plugin 1.3, older HTML files that have been converted using the the 1.2.x HTML Converter will still run correctly.

The bottom line is install the Java Plugin 1.3 and 1.3 version of the HTML Converter 1.3.


What are the step-by-step instructions for installing the Java Plugin and HTML Converter?

  • Download and install the Java Plugin 1.3 from http://www.javasoft.com/products/plugin/(5 MB).  If using Windows be sure you reboot after installing the Java Plugin before trying to use it. You only need to download and install it once. The Java Plugin does not work with Linux yet. Javasoft says a Linux version is expected to be available in the fall of 2000.
  • Download the HTML converter 1.3 file from the same page as above (145 KB).
  • Unzip the file htmlconverter.zip using your favorite zip file tool.
  • Place the unzipped files in a directory of your choice. I put the unzipped files in c:\javaclasses, because this is the directory where I place all 3rd party Java packages, and sometimes packages that I write myself. You do not have to put them in c:\javaclasses, but I will assume this directory for the rest of these suggestions. I have a line in my batch file that sets up my Java environment that contains classpath=.;c:\javaclasses. The zip file contains some files in the converter\sun directory and class files in converter\sun\plugin\converter\gui directory, plus some other directories at the same level as the gui directory. One can add the c:\javaclasses\converter\classes to one's classpath variable or move everything under the sun directory to directly under the c:\javaclasses directory. It appears that at least one package name using by the HTML converter is sun.plugin.converter.gui. Actually, you do not have to put any of the HTMLConverter files in one's classpath if you are willing to start the HTMLConverter from the correct directory. (see second next instruction).
  • Write and test your JDK 1.2.x or JDK 1.3.x applet using the appletviewer and an HTML file with the normal applet tags for running an applet. Use a real HTML file for this, not your Java source file with the applet tags in a comment, so that you have an HTML file for conversion later.
  • Run the HTMLConverter by opening a DOS window and do a cd to the converter\classes directory. Then start the converter with the command java -classpath . HTMLConverter. The following screen should appear.


  • The instructions in the Using the HTML Converter manual, say you can select a single file, but I could not find a way to select an single file.  I do remember that the older 1.2 version did allow me to select a single file. In fact here is a screen shot of the version 1.2 HTMLConverter from the notes for my previous course that show a field for a single file and a browse button for searching a single file. Oh well.
  • Use the browse button to select the directory where your HTML file is located. Choose the Standard IE & Navigator for Windows and Solaris template and then press the Convert button. After a few seconds the file will be converted.
  • Test locally on your hard drive by starting your browser and then opening the converted HTML file using the file open option. Hopefully your applet will run in the browser.
  • Once you get it to work locally, you can upload the converted HTML file and class/jar files as needed to your web page.
  • I find it reassuring to have the special Java Console window open when I run a Java 2 applet. To get it to automatically open when you run a Java 2 applet in your browser do the following in Windows.

  • Where can I find more documentation on the Java plugin?



    Last update: 21. Sep. 2000 by Larry Arnoldy.

    The End :-)