The Mozilla
Organization
At A Glance
Feedback
Get Involved
Newsgroups
License Terms
Newsbot
Developer Docs
Roadmap
Projects
Ports
Module Owners
Hacking
Get the Source
Build It
Testing
Download
Bugzilla
Bug Writing
Tools
View Source
Tree Status
New Checkins
Submit A Bug
FAQ
Search

MRJ Plugin for Netscape 4.X and Mozilla 5.X Browsers

Release Notes

3 August 1999

Version 1.0d9 now supports Applet printing. Printing of top-level frames must be managed by the applet itself.

14 June 1999

Expanded the set of MIME types used to load the plugin to include "application/x-java-applet", and "application/x-java-applet;version=1.1.1" for better compatibility with Sun's Java plugin.

21 March 1999

Added full support for top-level Java frames (woohoo!). Events are handled by patches to WaitNextEvent and MenuSelect. Various other approaches were tried, this was found to be the most compatible.

Fixed CODEBASE processing hopefully for all cases. Please let me know if you find any problems with this.

Added support for a subset of the class netscape.javascript.JSObject. JSObject.getWindow() and JSObject.eval() methods are partially implemented. JSObject.eval() only returns String objects.

12 March 1999

Added "ConsoleApplet" which provides a simple Java console running as an applet. You can bring up the applet in its own window by opening "LaunchConsole.html." This applet is included in "MRJPlugin.jar" so you know longer have to install ConsoleApplet.jar in your "MRJClasses" folder.

Introduction

This plugin enables current Netscape browsers (version 4.X and later) on Mac OS to use the MacOS Runtime for Java (MRJ) to run Applets. This is a development only release and support is limited. Use this plugin at your own risk.

MRJ 2.1 , which is required to run the plugin, can be downloaded from Apple's Java Web Site.

Using the MRJ Plugin

For Netscape 4.X, the plugin is invoked using an EMBED tag, in a similar manner to Sun's Java Plugin, which enables the JRE to be used to run Applets on Windows and Unix Systems (for the upcoming Mozilla 5.X browser however, support has been added to automatically recognize the APPLET tag and launch the appropriate Java Plugin for the Applet).

An APPLET tag that looks like this:

<APPLET 
	BORDER = "5"
	WIDTH = "200"
	HEIGHT = "200"
	ARCHIVE = "AppletClasses.jar"
	CODE = "TrivialApplet.class">
<PARAM NAME=URL VALUE="http://home.netscape.com">
</APPLET>

must be rewritten to use the EMBED tag:

<EMBED
	TYPE = "application/x-java-vm"
	NAME = "TrivialApplet"
	PLUGINSPAGE = "http://www.mozilla.org/oji/"
	BORDER = "5"
	WIDTH = "200"
	HEIGHT = "200"
	ARCHIVE = "AppletClasses.jar"
	CODE = "TrivialApplet.class"
	URL = "http://home.netscape.com">

The EMBED tag has the following additional attributes:

  • TYPE - this is the MIME type of the plugin, which must be "application/x-java-vm"
  • NAME - this is the JavaScript name of the EMBED Tag instance
  • PLUGINSPAGE - this is a URL that points to an web page that refers to this plugin. This helps the user find the MRJ plugin if it is not installed.

The rest of the attributes of the APPLET tag are given the same name in the EMBED tag. A PARAM tag is converted by adding an attribute to the EMBED tag whose name is the value of the PARAM tag's NAME attribute, and whose value is the value of the VALUE attribute. If there are name conflicts between the parameters and attributes, there will eventually be a substitution mechanism where parameters prefixed with "java_" will be passed to the applet with the prefix removed. This hasn't been implemented yet.

Security

The Plugin uses standard Applet security provided by MRJ. Remote applets can only open sockets with the server they come from, and only local applets can access the file system. There is no support for the Netscape security model, nor for signed applets. This will change.

Limitations

  • For 4.X browsers, you have to use the EMBED tag instead of the APPLET tag
  • Currently you cannot create top level windows from the Java applet. This might be addressed in future releases.
  • If your html page also has an APPLET tag (for compatibility with other browsers) then users should disable the built-in Java that comes with the Netscape browser.
  • LiveConnect capabilites between JavaScript and Java do not work with Applets that are run using this plugin

Installation Instructions

1. Download the MRJ Plugin. Your browser should automatically unstuff the file "MRJPlugin.sit.hqx" as the folder "MRJPlugin."

2. Open the "MRJPlugin" folder, and choose "as List" from the "View" menu in the Finder. You'll see the following items:

3. For 4.X browsers, move the files "MRJ Plugin" and "MRJPlugin.jar" from the "Plugin for 4.X" folder to your browser's "Plug-ins" folder. To install for the Gecko-based 5.X browser, the "Plugin for 5.X" folder contains a folder called "Netscape Plugins" which you need to drag into your System's "Extensions" folder.

4. Installation is now complete. Test your installation by opening the console applet with "LaunchConsole.html" which is in the "ConsoleApplet" folder.

Checkout and Build Instructions

The source code is located in the CVS module 'mozilla/plugin/oji/MRJ' in the Mozilla tree. Look here for directions on how to check out the Mozilla tree (note: instead of specifying 'SeaMonkeyAll' as the module name, use 'mozilla/plugin/oji/MRJ'). Once the code is checked out, see 'mozilla/plugin/oji/MRJ/docuentation/build-instructions.html' for more specific build instructions.

Bugs?

Don't hestiate to file them in Bugzilla. If you're interested in doing testing for the OJI MRJ Plugin, send mail to mark.lin@eng.sun.com.

This page last modified on 9 August 1999.

Copyright © 1998-1999 The Mozilla Organization.
Last modified August 10, 1999.