Domino Code Fragment

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


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


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