Email:   
Home
In This Issue
EasyPrint
Click here for the RSS feed's XML code. This is not a browser URL.
The ins and outs of using Java with Domino (continued)

Domino provides the standard structure for a Java agent when Java is selected as the Run type for an agent. Figure A shows the structure provided.

FIGURE A

Here's the Domino Designer Java environment. Click picture for a larger image.

It provides the appropriate import statement (import lotus.domino.*) needed to work with the Domino classes. Also, the main entry point for a Domino Java agent is the NotesMain method, and it's provided. A try/catch block is provided along with two objects: Session and AgentContext. The Session object represents the environment for the current program, and AgentContext represents the current environment for the agent.

Additionally, the reference tab next to the classes tab is available for online help during development. Figure B shows the reference tab opened to the Domino classes.

FIGURE B

The Domino Designer reference tab is opened to the Domino classes. Click picture for a larger image.

Core Java and XML classes are available for viewing as well. The reference tab lists the classes by their package names with twisties available to expand to the classes and their associated methods and properties.

I've got a couple of other comments regarding the Designer interface. You may have noticed four buttons at the bottom of the window: Edit Project, New Class, Export, and Compile. The Edit Project button allows classes to be removed and added to the current code. The New Class button adds a new class to the agent. Compile compiles the code into bytecode, and Export allows it to be saved to a local drive. Above the buttons is the error box where errors encountered during compilation are listed with the errant line numbers to the right.

Java Console
All developers should thoroughly debug their code to ensure proper functionality. The Domino client offers the Java Console for working with Domino Java code. All system output via print statements can be viewed in it. All error messages will be displayed in it as well. It's available via the File->Tools->Show Java Debug Console drop-down menu. Figure C shows the drop-down selection

FIGURE C

The drop-down menu activates the Java Debug Console. Click picture for a larger image.

Figure D shows the actual window.

FIGURE D

Here's the Java Console window. Click picture for a larger image.

Class files
Java class files are most often distributed via JAR (Java ARchive) files. This is a compression format unique to Java, much like WinZip or Microsoft CAB files. Well, the Domino Java classes are distributed in a JAR file. They're located in the base directory of your Domino R5 installation.

Table A shows the files that are available.

File name Description
dservlet.jar Domino Java Servlet classes
i18n.jar Core SUN Java classes
jsdk.jar SUN Java Servlet classes
LotusXSL.jar XSLT Processor (Xalan) classes
Notes.jar Domino Java classes
rt.jar Core SUN Java classes
tools.jar Core SUN Java classes
XML4j.jar XML Parser classes (Xerces)




[ Prev | Next ]

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
-- Advertisement --

AUTOMATE LOTUS NOTES USER ID MANAGEMENT
ID Manager 4.5 from HELP Software provides a new level of automaton for managing Lotus Notes IDs. ID Manager lets Lotus Notes administrators get out of the business of creating and managing user IDs. Use our ROI calculator to see how quickly ID Manager will pay for itself.

Learn more about HELP Software products
-- Advertisement --

Now for the first time, real-time dashboards within Notes!
No more tedious report iteration and endless data exporting! The New IntelliPRINT Dashboard Reporting now empowers you to easily create analyzable widgets and real-time dashboard reports. Your business managers can then quickly customize, extend, and analyze these dashboards to their heart's content!

All from within your Lotus Notes data, all in real-time!

Download your Free Trial today!

Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.
Editor's Login