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.


  1. Open a page or form, or click in the rich text field of a document.
  2. Choose Create - Java Applet.
  3. 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.
  4. Click Locate to see all related files for the applet.
  5. 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.
  6. Click OK twice.
  7. 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.
  • For Netscape users, include the ZIP and JAR files.
  • 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. Netscape ignores the CABBASE (or CABINETS) parameter and Internet Explorer ignores the ARCHIVE attribute.
Note: At the Folder tab of the Java Applet Properties box, you can view the applet files from an applet you imported. If you did not import an applet, this field is blank.