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






Examples: getEnvironmentValue method

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




Library | Support | Terms of use |

Last updated: Monday, October 5, 2009