Setting up shared applet resources
About this task
For large Java™ applets with multiple files, consider storing some of the related files as shared resources in the database. When you set up files as shared resources, all the applets can use a single copy of the file, instead of each applet storing its own copy. Then, if a file requires updating, you only need to update one file. For applications that include multiple databases, one database can hold shared resources for use in all the related databases.
To create a shared applet resource
Procedure
- Select the database where you want to set up the shared resources.
- Choose Resources - Applets.
- Click "New Applet Resource."
- In the "Base Directory" field, enter the path where the Java™ applet files are stored.
- Select the files you want to set up as shared resources from the "Available Java™ Files" list and click Add/Replace file.
- Click OK and enter a name. Click OK and Domino® stores all the files as a shared resource with the name you entered.
- Optional: Double-click the shared resource to open the Java™ Resource Properties box. At the Basics tab, you can rename the shared applet and give it an alias. You can also view the files that make up this applet.
To use a shared applet resource
About this task
You can include a shared applet resource from the current database, or from another database on your desktop.
Procedure
- Open a document and click in a rich text field.
- 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 and shared resources for the applet.
- Select "Resources" in the Browse list, specify the database where the shared resource resides, and select the related applet files. Click Add/Replace File.
- Click OK twice.