Examples: UserName property (Session - Java)

The following agent prints the user name.

import lotus.domino.*;
public class JavaAgent extends AgentBase {
  public void NotesMain() {
    try {
      Session session = getSession();
      AgentContext agentContext = session.getAgentContext();
      // (Your code goes here) 
      String u = session.getUserName();
      System.out.println("User name = " + u);
    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}