Lotus Software logo
IBM Lotus Domino Designer 8.5
  Versions 8.5 and 8.5.1






Examples: getEnvironmentString method

  1. This application gets the value of the $EnvLoc environment variable.
  2. import lotus.domino.*;
    
    class getenvstring extends NotesThread
    {
    public static void main(String argv[])
    {
    getenvstring t = new getenvstring();
    t.start();
    }
    public void runNotes()
    {
    try
    {
    Session s = NotesFactory.createSession();
    String envloc = s.getEnvironmentString("EnvLoc",
    false);
    if (envloc == null)
    System.out.println("No $EnvLoc");
    else
    System.out.println("$EnvLoc = " + envloc);
    }
    catch (Exception e)
    {
    e.printStackTrace();
    }
    }
    }
  3. This application gets the value of the MailServer system environment variable.
  4. import lotus.domino.*;
    
    class getenvstring2 extends NotesThread
    {
    public static void main(String argv[])
    {
    getenvstring2 t = new getenvstring2();
    t.start();
    }
    public void runNotes()
    {
    try
    {
    Session s = NotesFactory.createSession();
    String ms = s.getEnvironmentString("MailServer",
    true);
    if (ms == null)
    System.out.println("No MailServer");
    else
    System.out.println("MailServer = " + ms);
    }
    catch (Exception e)
    {
    e.printStackTrace();
    }
    }
    }
Related topics
getEnvironmentString method




Library | Support | Terms of use |

Last updated: Monday, October 5, 2009