Examples: sendConsoleCommand method

This agent gets the tasks on a server.

import lotus.domino.*;

public class JavaAgent extends AgentBase {
    
  RichTextStyle rtstyle = null;

  public void NotesMain() {

    try {
      Session session = getSession();
      AgentContext agentContext = session.getAgentContext();

      // (Your code goes here)
      String server = "server1/east/acme";
      String command = "Show Tasks";
      System.out.println(
        session.sendConsoleCommand(server, command));

    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}