TITLE
    Mac OS Runtime for Java (MRJ) v2.0
Article ID:
Created:
Modified:
22133
1/7/98
4/26/00

TOPIC

    This is the Read Me for Mac OS Runtime for Java Version 2.0.

    This software is no longer available as a free download from Apple Support Web site. It has been replaced by Mac OS Runtime for Java 2.1.2. To download the later version please go to: http://asu.info.apple.com/swupdates.nsf/artnum/n11304


DISCUSSION

    About Mac OS Runtime for Java Version 2.0

    Introduction
    Mac OS Runtime for Java (MRJ) 2.0 is a software package that includes Apple's implementation of the Java Virtual Machine (VM) and related libraries. It is based on software created by the JavaSoft business unit of Sun Microsystems, Inc. and implements version 1.1.3 of Sun's Java specification.

    With MRJ installed, you are able to run Java applets within the Microsoft Internet Explorer web browser or the Apple Applet Runner, both of which are included with Mac OS 8.1.

    Microsoft Internet Explorer
    The most convenient way to locate Java applets on the World Wide Web and to run them is to use a web browser such as Microsoft Internet Explorer. To configure Internet Explorer to use MRJ so that you can run Java applets, first use the Preferences command in the Internet Explorer Edit menu to bring up the Internet Explorer Preferences dialog. Click the triangle next to "Web Browser" in the box on the left side of the dialog to disclose its subcategories. Then click the "Java" subcategory to see the Java Options pane on the right side of the dialog:



    Check the "Enable Java" box so you will be able to run Java applets and use the "Java virtual machine" popup menu to select "Apple MRJ". To confirm the selections, click OK to dismiss the dialog. You must then quit Internet Explorer and run it again for the new selections to take effect.

    Apple Applet Runner
    You can also use Apple Applet Runner to run Java applets. It is located in the "Mac OS Runtime for Java" folder in the "Apple Extras" folder of your startup disk.

    Each Java applet on the Internet has a unique URL (Uniform Resource Locator), or address, that the Apple Applet Runner uses to locate it. If you know the URL of an applet you want to run, use the "Open URL" command (in the File Menu) to add it to a list of saved URLs, pick the applet from the list, then click the Open button to run it.

    You can also run an applet that is stored on your local hard disk. To do this, use the "Open Local HTML File" command (in the File menu) to select the HTML (Hypertext Markup Language) file used to identify and run the applet. This file, whose name usually has a ".html" suffix, is most often located inside the folder on your hard disk where the applet is stored. You can also drag and drop an applet's HTML file on the Apple Applet Runner icon from the Finder.

    Note : If you run applets using the Apple Applet Runner you will see only the applet window itself. If you run the applet inside a Java-enabled web browser like Internet Explorer, you will usually see other information displayed on your web page around the portion used to show the applet. This information comes from the same HTML file used to run the applet, but is intended for use only by browsers and is ignored by Apple Applet Runner.

    Several demonstration applets can be run from the Applets menu in Apple Applet Runner even if you do not have an active Internet connection. These applets are stored locally in the Applets folder inside the "Mac OS Runtime for Java" folder in the "Apple Extras" folder. Note that the demonstration applets were created by Sun Microsystems, Inc., not by Apple Computer, Inc., and may not follow Apple's guidelines for user interaction.

    Where to Find Applets to Run
    There are thousands of applets available on the Internet, most of them for no charge. Three good starting points for finding applets are: System requirements
    MRJ 2.0 works on PowerPC and 68040 computers running Mac OS 8.0 or later. At least 16 MB of RAM is required and at least 30 MB of free disk space. To run Java applets over the Internet you must have an active Internet connection.

    Requires Mac OS 8.0 or 8.1, a minimum of 8 MB of available RAM after your web browser is launched (if using a web browser), and at least 30 MB of available disk space. MRJ 2.0 may be installed on System 7.6.1 by doing a Custom Install and choosing the software components appropriate for that System.

    What's Installed with MRJ?
    The MRJ 2.0 installer places the following software components on your hard disk:

    On all computers:
    • "Mac OS Runtime for Java" folder in the Apple Extras folder at the top level of the startup drive; this folder holds the Apple Applet Runner and many demonstration applets.
    • "MRJ Libraries" folder in the Extensions folder of the active System Folder
    • "Text Encoding Converter" file in the Extensions folder of the active System Folder (if needed)
    • "Text Encodings" folder in the active System Folder (if needed)
    On 68040 computers only:
    • "CFM-68K Runtime Enabler" file in the Extensions folder of the active System Folder (if needed)
    When you run the Apple Applet Runner, a preferences file named "Apple Applet Runner Prefs" is saved in the Preferences folder of the active System Folder.

    What's New in MRJ 2.0?
    MRJ 2.0 supports Sun's Java version 1.1.3 specification, which has added or improved support in the following areas:
    • Internationalization
    • Security and Signed Applets
    • AWT Enhancements
    • JavaBeans
    • JAR File Format
    • Networking Enhancements
    • I/O Enhancements
    • Math Package
    • Remote Method Invocation
    • Object Serialization
    • Reflection
    • JDBC - Connecting Java and Databases
    • Inner Classes
    • Java Native Interface
    • Performance Enhancements
    • The demonstration applets have been updated and/or replaced with new examples
    For detailed technical information on these new features, visit Sun's web site at http://java.sun.com/products/jdk/1.1/docs/ .

    MRJ 2.0 also contains a just-in-time compiler (JITC) for both PowerPC and 68040 Macintoshes that greatly enhances the speed of many operations in Java.

    MRJ Software Development Kit
    If you are a software developer and you want to learn more about programming with Java on a Macintosh, visit our web site at http://applejava.apple.com/ for information on how to obtain a software development kit (SDK) to facilitate your development efforts using MRJ. The MRJ SDK includes utilities and documentation that allow software developers to:
    • run Java applets and applications within a Macintosh application
    • access the Java runtime from a Macintosh application
    • call Java methods from C and C++
    • call native methods from Java
    • build standalone Java applications

    Troubleshooting

    Memory Usage
    If there is not enough random-access memory (RAM) in your computer, you may have trouble running Java applets or applications. If you see an error message that contains one of terms below, the issue might be that you do not have enough memory to run:
    • OutOfMemoryError
    • OutOfMemoryException
    • java.lang.NoClassDefFoundError
    • java.lang.NullPointerException
    Note : These error messages may happen for reasons other than low memory. You might try running the applet or application on another computer to see if the same error messages occur there.

    MRJ uses system memory to run Java applets and applications. Applications allocate their own application memory, leaving less memory available to the rest of the system. If an application that uses MRJ (such as Apple Applet Runner or Internet Explorer) is using an especially large amount of memory, you may have trouble running large Java applets or applications.

    To make more memory available try quitting applications that you aren't using. If you still cannot run the applet or application, try reducing the amount of memory used by the application that is using MRJ. To reduce an application's memory size, first quit the application, then select the application's icon and choose Get Info from the Finder's File menu. Enter a smaller number in the Preferred Size field, but do not set the preferred size smaller than the indicated minimum size.

    You may also wish to turn on Virtual Memory to allow applications to use some of your disk space as if it were RAM. This allows you to run more memory-intensive programs, but your computer may run more slowly as a result. You can turn Virtual Memory on via the Memory control panel.

    Known Problems
    • MRJ may display error messages, fail to load images or fail to play sounds if there is not enough memory available to run, as described in the Memory Usage section above. In rare cases, MRJ may stop responding if it cannot get enough memory to run. Try the techniques described in the Memory Usage section if you are having trouble running MRJ.
    • Marimba's Castanet Tuner 1.0, distributed with Mac OS 8.0, does not work with MRJ 2.0, only with MRJ 1.0.2 (provided with Mac OS 8.0) and MRJ 1.5. Contact Marimba for information on how to upgrade to a newer version that does work with MRJ 2.0. Marimba's web address is http://www.marimba.com/ .
    • Some Java applets (such as the Clock example) or applications that are processor intensive may cause other applets to open or run slowly, or may cause them not to open at all. To improve performance, try closing applets or applications that you are not using.
    • If you have an extension called PPCExceptionEnabler in the Extensions folder of your active System Folder you must remove it and restart before running MRJ. This extension was installed by early versions of Macintosh Common Lisp (MCL); the latest version of MCL does not require this extension. If you have MCL 3.9 or earlier, upgrade to version 4.0 or later.
    Further Information
    Visit our Web site at http://applejava.apple.com/ to find out about future releases of MRJ, fixes to problems, and so on.


    Java not Fault-tolerant
    The Java technology is not fault-tolerant and is not designed, manufactured or intended for use or resale as on-line control equipment in the operation of nuclear facilities, aircraft navigation or communication systems, or air traffic control machines in which the failure of the Java technology or Mac OS Runtime for Java could lead directly to death, personal injury, or severe physical or environmental damage.

    For the most current information on what SDKs Apple offers, point your web browser to:

    http://developer.apple.com/sdk/

Document Information
Product Area: Apple General Information
Category: Apple On Line Resources
Sub Category: Apple SW Updates

Copyright © 2000 Apple Computer, Inc. All rights reserved.