Running a Java program

You can call into the object interface from a Java program by importing the lotus.domino package. The program can be coded as an application, a Domino agent, an applet, or a servlet. Local calls access run-time code on the local machine, which must have Domino installed. Remote (IIOP) calls access run-time code from a remote Domino server; in this case, the local machine need not have Domino installed. Compilation must be on a machine with Domino Designer R5 installed.

Note The lotus.domino package has the same content as the R4.6 lotus.notes package plus new classes, methods, and other enhancements. The R4.6 lotus.notes package continues to be supported for backwards compatibility only; it does not contain the new classes, methods, and other enhancements.



Requirements


Server requirements

Remote calls require access to an R5 Domino server.

The server tasks HTTP and DIIOP must be running. Ensure that the server notes.ini file contains the following line:

ServerTasks=<any other tasks>,http,diiop

Or you can start the tasks later with the load console command.

The server document in the Domino Directory (under Server\Servers) must permit and restrict remote calls as desired:

A server refreshes its cache of security options approximately every half hour. The console command "tell diiop refresh" forces an immediate refresh.


Designer requirements

Compilation of a Java program using the lotus.domino package requires installation of Domino Designer R5.

Ensure that the notes.ini file of the Designer machine contains the following line:

ALLOW_NOTES_PACKAGE_APPLETS=1

For stand-alone applications, include domino\java\NCSO.jar and Notes.jar from the Notes directory in the CLASSPATH environment variable. For example:

set CLASSPATH=.;c:\notes\domino\java\NCSO.jar;c:\notes\Notes.jar

Notes.jar contains the high-level lotus.domino package, the lotus.domino.local package for local calls, and the old lotus.notes package. NCSO.jar contains the high-level lotus.domino package and the lotus.domino.corba package for remote calls. Strictly, you do not need NCSO.jar if you are not compiling remote calls and you do not need Notes.jar if you are not compiling local calls or old calls.

Your class code must import the high-level lotus.domino package:

import lotus.domino.*;

Run-time requirements

A machine running a Java application that makes local Domino calls must contain Domino R5 (Client, Designer, or Server) and must include Notes.jar in the CLASSPATH.

A machine running a Java application that makes remote Domino calls need not contain Domino R5, but must contain NCSO.jar and must include NCSO.jar in the CLASSPATH.

A machine running a Domino R5 agent that makes Domino calls must include Notes.jar in the CLASSPATH.

A machine running an applet that makes Domino calls needs no Domino software or CLASSPATH assignments.



Calling the lotus.domino package

The following guidelines apply to Java programs calling into the lotus.domino package:



Using the lotus.domino classes

The lotus.domino classes allow you to access named databases, views, documents, and other back-end objects. The following lotus.domino classes are for direct, public use:



See examples