Domino Code Fragment

Code Name*
getEnvironmentValue method
Date*
04/29/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.142.173.227
Description*
2. This script gets the value of the system environment variable Timezone.
Type*
Java
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
import lotus.notes.*;


class getenvval2 extends NotesThread
{
 public static void main(String argv[])
   {
       getenvval2 t = new getenvval2();
       t.start();
   }


 public void runNotes()
   {
   try
     {
       Session s = Session.newInstance();
       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();
     }
   }
}