ð About Apple Applet Runner MRJ 2.2.5 There have been no changes to Apple Applet Runner since the 2.2 release. The Apple Applet Runner is a utility for running applets without the overhead of a browser. It does not display HTML files, but simply extracts the tags from the HTML and runs the applets. You can use Apple Applet Runner to run local applets Ñ applets stored on your local hard drive, or remote applets Ñ applets on the internet. This version of Apple Applet Runner offers significant enhancements over previous versions, making it easier to open saved applets. Running Applets Apple Applet Runner runs applets by extracting their tags from HTML (Hypertext Markup Language) files. These files may contain additional content that would be displayed in a web browser, but Apple Applet Runner will only display the applet, not the additional content. If the page contains more than one tag, all of the applets will be run. ¥ Running new applets You can run either local or remote applets by choosing the File menu item ÒOpen Location...Ó and entering the appletÕs complete URL in the text field. You can enter a fully qualified URL of the form http://java.sun.com/applets/other/TumblingDuke/index.html. If you leave off the Òhttp://Ó, Applet Runner will prepend it to the URL before connecting. ¥ Running local applets You can run applets stored on your local hard drive in several ways. The Applets folder located next to the Apple Applet Runner application contains several sample applets. You can place frequently used applets in subfolders of this folder. We have included the SunSphere applet (with source), and the applets used by the scripting sample code included in the MRJ SDK. The list of applets in this folder are grouped together at the end of the ÒAppletsÓ menu. You can also use the File menu item ÒOpen...Ó to select an HTML file on your hard disk which contains an tag. You can also drag and drop the HTML file onto the Apple Applet Runner application icon in the Finder and Apple Applet Runner will attempt to run the applet. ¥ Internet Location Files You can also run applets whose URLs are stored in Internet Location FilesÑalso known as web clippings. Simply drag an Internet Location File onto the Apple Applet Runner application icon from the Finder, and it will access the referenced URL and load any applets at that location. The ability to create Internet Location Files was introduced in Mac OS 8.5; however, Apple Applet Runner will respond to web clippings created in Mac OS 8.5 even when it is running on older systems. Apple Applet Runner will read only Internet Location Files of type http:// or file:///. To create an Internet Location File, select text containing a URL and drag it to the desktop. Two examples of text that could be used to create Internet Location Files are file:///HardDisk/ArcTest/example1.html http://java.sun.com/applets/other/TumblingDuke/index.html Any spaces in the pathnames must be replaced with Ô%20Õ. ¥ URL files or text files containing a valid URL Apple Applet Runner will also recognize files of type ÒURL Ó. If you double-click one of these files or drag it to Apple Applet Runner, Apple Applet Runner will read the text from the file and access the referenced URL and load any applets at that location. You can create a URL file by opening an applet and selecting ÒSave As...Ó from the File menu. Netscape Navigator 4.0 can be used to create ÒURL Ó files. You can also create them from a text file that contains only a URL by changing the fileÕs type to ÒURL Ó (note the space after URL) and creator to ÒWARZÓ. To create one of these text files, do the following: 1) create a text file that contains only the text http://java.sun.com/applets/other/TumblingDuke/index.html 2) using ResEdit, or other resource editor, change the fileÕs type to ÒURL Ó and creator to ÒWARZÓ. ResEdit can be downloaded from the Apple Software Updates page at Òhttp://asu.info.apple.com/Ó If you have trouble dragging an Internet Location File or a URL file onto Apple Applet Runner, you may need to rebuild your desktop. To rebuild the desktop, hold down the Command key (ð) and Option key while you restart your computer. Saving applets ¥ Adding an applet to the Applets menu The menu item ÒAdd Applet to ListÓ will add the active applet to the list of saved applets appearing in the Applets menu. This menu item does not actually save the applet, but rather a reference to it. You can then rerun the applet by selecting its name from the Applets menu. If you wish to change the name of the Applet as it appears in the Applets menu, choose ÒEdit Applet List...Ó described below. Following the list of saved applets in the Applets menu is the list of applets residing in the Applets folder next to the Apple Applet Runner application. You can place frequently used applets in subfolders of this folder. These applets will appear in the Applets menu when you quit and relaunch Apple Applet Runner. ¥ Saving an Applet's location in a file You can save a reference to an applet in a URL file. The ÒSave As...Ó menu item will bring up a file dialog allowing you to save a reference to the active applet in a URL file. See the section above describing URL files. Editing applet names or locations ¥ ÒEdit Applet List...Ó menu item The ÒEdit Applet List...Ó menu item brings up a dialog displaying the list of saved applets. The list of saved applets is preset with one applet which is maintained by Sun. You can use this dialog to open an applet, edit an appletÕs URL or name, or delete or add a new applet to the list. The URLs can either refer to applets on your local hard disk (file:///) or on the internet (http://). Note: The applet list is stored in the file ÒApple Applet Runner PrefsÓ in the folder System Folder:Preferences on your startup disk. Applet security preferences The ÒPreferences...Ó menu item in the File menu allows you to specify standard Java security settings such as access restrictions and network proxies. Once saved, the preferences take effect with the next Applet launched. The new preferences will have no effect on currently running applets. HTML pages with no applets If you attempt to open an HTML file that does not contain an tag, Apple Applet Runner will send the file to the userÕs default browser. You can set your default browser using Internet Config or the Internet control panel. Thus, if the default browser is set to Netscape and you try to open a file or URL that contains no applets, Netscape will display the HTML file. WARNING: Do not set your default browser to Apple Applet Runner. Doing so will result in a recursive situation when Apple Applet Runner attempts to open an HTML page with no applets. You may have to reboot the machine to get out of this situation. Scripting Apple Applet Runner You can use AppleScript to control applets running inside Apple Applet Runner. For more information, see the documentation in the ÒMRJ ScriptingÓ folder in the MRJ SDK. The SDK is available at Òhttp://developer.apple.com/java/Ó. For more information on AppleScript in general, see Òhttp://www.apple.com/applescript/Ó, or the AppleScript folder in Apple Extras on your startup disk. Known problems ¥ [2415173] If the modification date of the ÒAppletsÓ folder is January 1, 1904 12:00 AM, Apple Applet Runner will not put up the Applets menu. Bug fixes ¥ [2390637] Double-clicking on the Apple Applet Runner Prefs file (in the Preferences folder) would cause the Finder to attempt to repeatedly start Applet Runner and the default browser, and possibly force you to restart. Apple Applet Runner version 2.2 will fix the preferences file the first time it is launched. © 1999-2001 Apple Computer. Inc. All rights reserved. Apple, the Apple logo, LaserWriter, MacTCP, Power Macintosh, Mac, and Macintosh are trademarks of Apple Computer, Inc., registered in the U.S. and other countries. PowerPC is a trademark of International Business Machines Corporation, used under license therefrom. Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All other product names are trademarks or registered trademarks of their respective holders. Mention of non-Apple products is for information purposes and constitutes neither an endorsement nor a recommendation. Apple assumes no responsibility with regard to the selection, performance, or use of these products. Updated April 18, 2001