|
Since the current standard browsers do not have interpreters for Java 1.2, JavaSoft has developed a Java 1.2 VM plug-in. A plug-in is a third-party program that is downloaded to the browser and runs within the browser environment. Common plug-in's include Apple's Quicktime video viewer and Macromedia's Shockwave animater. After a plug-in is downloaded and installed the first time, the plug-in will thereafter be run from the local disk and so will not causing any delays. To tell the browser to use the plug-in for your applet requires some messy HTML code, unfortunately . For example, the html code for the JButton example applet discussed earlier looks like:
The html code to run this with the plug-in with either MS Internet Explorer or Netscape becomes:
This code is a bit obscure and you don't have to understand it (Java Plug-in HTML Specification for details) since there is a tool to create this code for you. Sun provides the Plug-in Converter - JavaTM
Plug-in 1.2 Software HTML Converter Features - that reads in an html file with a conventional applet tag and output an html file with the tag converted as above. Download the converter from the above site and install it on your machine. (It is a Java program so it will run on any platform for which there is a JDK available.) Running it will bring up a window like this:
You can convert many files at once or just one at a time. Backup copies of the original html file are saved in the folder chosen (default is a Converter_BAK directory that is in parallel with the directory in which the converter is unpacked.) If there are mulitiple applets in the html file, it will convert them all. The Converter currently can set up the plug-in code for Internet Explorer or Navigator on Windows 95, Windows NT, or Solaris 2.5 & 2.6. Templates can be defined to create tags to load the plug-in for other platforms. If there is a JDK 1.2 available for a platform, then a plug-in can be configured since it is basically the same VM for both.
|
||||||||||||
|
|||||||||||||