harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject Re: [classlib][security] Changing system property java.home may cause incorrect initialization of java.security.Security class
Date Fri, 24 Nov 2006 20:17:28 GMT
Geir Magnusson Jr. wrote:
> Tim Ellison wrote:
>> Geir Magnusson Jr. wrote:
>>> Isn't java.home set on vm start and immutable?
>>
>> No.
> 
> "No" what?

?? It is untrue that java.home is set on vm start and immutable.

e.g.

  public static void main(String[] args) {
    System.out.println(System.getProperty("java.home"));
    System.setProperty("java.home", "anything I want it to be");
    System.out.println(System.getProperty("java.home"));
  }

produces:

  C:\java\IBM JDK 5.0\SR3\jre
  anything I want it to be


-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

Mime
View raw message