Domino Code Fragment
| Code Name* getEnvironmentValue method | Date* 10/24/2025 | Source (or email address if you prefer)* [email protected] IP address:.172.70.80.242 | |
| Description* 2. This script gets the value of the system environment variable Timezone. | Type* Java | Categories* (Misc) | |
| Implementation: | Required Client: | Server: |
| Limitations: | Comments: | |
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();
}
}
}