Setting System property for the JVM



I am retrieving emails from a mail box using pop3 over SSL. For that
purpose I am setting a truststore variable as a system property.

<code>
System.clearProperty("javax.net.ssl.trustStore");
Properties p = new Properties(System.getProperties());
p.put("javax.net.ssl.trustStore", "C:\\cacerts");
System.setProperties(p);
<code>

Everything works fine.

But lets say that, in my current executing thread, this parameter
needs to be altered runtime, to, Say a file in a non-existing folder,

<code>
System.clearProperty("javax.net.ssl.trustStore");
Properties p = new Properties(System.getProperties());
p.put("javax.net.ssl.trustStore", "C:\\certificates\\cacerts");
System.setProperties(p);
<code>

And, also that I delete the C:\\cacerts file to make sure the new path
is picked up...

The program fails !

I see that this property is being set only once for that JVM instance.
Any subsequent modification is not being considered.

Is this how this was designed?
.



Relevant Pages

  • Re: exchange and pop3
    ... To configure POP3 with SSL on SBS server, ... Double click the Microsoft Exchange POP3 service. ... Open Exchange Server Management. ...
    (microsoft.public.windows.server.sbs)
  • Re: Retrieving pop mail from gmail/ssl
    ... I have no idea why IMAP extension functions are not working for you. ... I do not use that extension because I have a POP3 client class ... If you are referring to the questions about ssl support, ... You should see mod_ssl in your loaded modules; you should also see other entries for your SSL package (probably OpenSSL) in your environment. ...
    (comp.lang.php)
  • Re: Retrieving pop mail from gmail/ssl
    ... I have no idea why IMAP extension functions are not working for you. ... I do not use that extension because I have a POP3 client class ... If you are referring to the questions about ssl support, ...
    (comp.lang.php)
  • POP3+SSL not working 8(
    ... My pop3 ssl connection to exchange 5.5 mailboxes isnt working. ... and the server, with 'Basic using SSL' and 'Windows NT ...
    (microsoft.public.exchange.misc)
  • POP3 and SSL not working 8(
    ... My pop3 ssl connection to exchange 5.5 mailboxes isnt working. ... and the server, with 'Basic using SSL' and 'Windows NT ...
    (microsoft.public.exchange.admin)