Running a Java program

You can call the Domino Objects 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 computer, which must have Domino installed. CORBA-based remote (IIOP) calls access run-time code from a remote Domino server; in this case, the local computer need not have Domino installed. Compilation must be on a computer with Domino Designer installed.

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


Server requirements

CORBA-based remote (IIOP) calls require access to a 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. Right-click on a field description to display an extended description.

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

SSL security for CORBA-based Domino Object applications/applets builds on the Web Server SSL security. You must first set up the Web server security using the "Domino R5 Certificate Authority" application.

Designer requirements

Compilation of a Java program using the lotus.domino package requires installation of Domino Designer Release 5 or greater.

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


For stand-alone applications, include Notes.jar from the Notes program directory and domino\java\NCSO.jar, domino\java\NCSOC.jar, or domino\java\ from the Notes data directory in the classpath. For example:

set CLASSPATH=.;c:\notes\data\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. The NCSO archive contains the high-level lotus.domino package and the lotus.domino.corba package for remote calls. Strictly, you do not need the NCSO archive if you are not compiling remote calls and you do not need Notes.jar if you are not compiling local calls or old calls.

The three NCSO archives have identical content but differ in the archiving technique:

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

import lotus.domino.*;

Run-time requirements

A computer running a Java application that makes local Domino calls must contain Domino Server, Domino Designer, or Notes Client, and must include Notes.jar in the classpath.

A computer running a Java application that makes remote Domino calls need not contain Domino or Notes, but must contain one of the NCSO archives and must include it in the classpath.

A computer running a Domino agent that makes Domino calls must include Notes.jar in the classpath.

A computer running an applet that makes Domino calls needs no Domino software or classpath assignments. The applet must be loaded from a computer containing a Domino server.

Note Do not use NCSOW.jar in the classpath for executing remote (IIOP) calls in a WebSphereŽ environment. NCSOW.jar is no longer kitted as it was starting with Release 5.0.4. You can continue to run programs that use NCSOW.jar on R5 servers, but not on Release 6 servers. The NCSO archives work with both R5 and Release 6 servers.

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 Also