classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with system properties


From: Bryce McKinlay
Subject: Problem with system properties
Date: Fri, 21 Jun 2002 14:21:36 +1200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1a) Gecko/20020610

Compare the output of this test case using the current GCC/classpath compared with GCC 3.1 or the JDK:

public class PropTest
{
 public static void main(String[] args)
 {
   System.out.println (System.getProperties());
 }
}

The problem (introduced into GCJ by a classpath merge) makes it impossible to get a list of all the system properties which are defined, because the "real" system properties are now just default properties for the properties object that is returned by System.getProperties()

While looking for a fix, I wonder why system property initialization was moved from System to Runtime. The comments mention something about VM bootstrapping, but I don't understand why it makes a difference in this case - System.<clinit> calls loadLibrary which will cause Runtime to be initialized anyway, so property initialization occurs at basically the same time. It would make more sense to me to keep the properties init code in System. Comments?

regards

Bryce.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]