Importing an applet
About this task
Before you import a Java™ applet, you must enable Java™ applets on your workstation and make sure all the related files are available on your workstation.
Procedure
- Open a page or form, or click in the rich text field of a document.
- Choose Create - Java™ Applet.
- In the Create Java™ Applet
dialog box:
- Select "Import an applet from the file system."
- In "Base Directory," enter the path for the applet files.
- In "Class Name," enter the name of the main class.
- Click Locate to see all related files for the applet.
- Browse for the applet files from the local file system,
or from the Resources list, then do one of the following:
- If you are using a shared resources applet, specify the database where the applet files reside. Select the related applet files and click Add/Replace File.
- If you are inserting an applet that is packaged as a JAR file, select the JAR file, and click Add/Replace File to include the JAR file.
- Click OK twice.
- Optional: Set applet parameters, attributes, and properties.
Getting the main class name
About this task
One way to make sure you have the correct name for the main class (which you enter in the Create Java™ Applet dialog box) is to use any text editor to open the associated *.HTML file and check for this HTML tag:
<applet code=filename.class>
For example, the main class name for the following Java™ applet is ArcTest.class.
<applet code=ArcTest.class width=400 height=400></applet>
Selecting related files
About this task
Applet files can be of the following types:
- Class -- *.CLASS
- Archive -- *.JAR, *.ZIP, *.CAB
- Resource -- *.JPG, *.JPEG, *.GIF, *.AU
- Source -- *.JAVA
For most applets, you must select all class and resource files. Select the source files only if you plan to send the applet to another user who wants to export them and change the applet.
If you are inserting an applet that is packaged as a JAR file, you can enter the path and the main class name as described previously. Note that browsing for the JAR file inserts the filename with a CLASS extension in the Class Name field. In some cases, the file name and the main class name are the same; in other cases, they are different and you must edit what appears in the Class Name field to be the correct main class name.
If you have more than one applet in a form, document, or page, Notes® stores only one copy of common files.
Importing applets packaged as CAB or ZIP files
About this task
If you import an applet that is packaged as an archive file (such as either a CAB or ZIP file), consider the browsers the application users have:
- For Internet Explorer users, include the CAB file. Note: Domino® does not display an embedded applet that is packaged as a CAB file.
- If users are likely to use either or both browsers, include CAB, JAR, and ZIP files. Domino® creates the appropriate parts of the APPLET tag for these files. Internet Explorer ignores the ARCHIVE attribute.