Java in Notes/Domino Explained: Tricks in the Java Debug Console


The Java Debug Console is found under FileToolsShow Java Debug Console in the menu and this is where the output of System.out and System.err goes. There are a number of secret keyboard commands you can use to show various information. Below is a listing of these commands.

Note: The cursor has to be in the output field (the big one on the top) for the commands to work.

Key Description
p Print a list of the system properties (an enumeration of System.getProperties()
d Toggle debug info.
m Show memory information
g Run garbage collection
h Show help (list commands)
f Finalize objects in queue
v Show Java version information
0-9 Set applet error level

4 thoughts on “Java in Notes/Domino Explained: Tricks in the Java Debug Console”

  1. Mikkel,

    Do you know how to display java (agent) error messages in a Lotus Notes messagebox (or prompt)? I want the text of the errors to appear to the user as the agent is running.

    Thanks,

    J.A. Griggs

  2. Well you can use Swing (the Java GUI framework) to do it. The easiest is to use some of the utility classes for messageboxes. The below example should illustrate the point.

    import lotus.domino.*;
    import javax.swing.*;
    
    public class JavaAgent extends AgentBase {
    
       public void NotesMain() {
          try {
             Session session = getSession();
             AgentContext agentContext = session.getAgentContext();
             NotesException e = new NotesException();
             e.text = "This is my message";
             e.id = 9999;
             throw e;
    
          } catch (NotesException e) {
             JOptionPane.showMessageDialog(null,
                "NotesException: " + e.text + " (id: " + e.id + ")",
                "NotesException",
                JOptionPane.WARNING_MESSAGE);
          }
       }
    }
    

    Was this the kind of information you were after?

Comments are closed.