classpath
[Top][All Lists]
Advanced

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

RFC: gnu.classpath.SystemProperties


From: Jeroen Frijters
Subject: RFC: gnu.classpath.SystemProperties
Date: Thu, 2 Dec 2004 16:57:42 +0100

Hi,

I finally got around to it and implemented my idea to move the system
properties out of java.lang.System into a public class in the gnu.*
package.

I'm running IKVM with the attached code with no Mauve regressions and it
solves *all* known cyclic initialization issues. I built an IKVM
specific test that basically loops thru all public Classpath classes and
initializes them (in a new VM for each class) to make sure that at least
the static initializer for the class doesn't cause problems.

Before this patch there were a whole bunch of classes that failed this
test, but with this patch they all went away.

Note that this doesn't mean there aren't any more dependencies, but if
they do exist, they will be easier to fix.

Note also that this patch doesn't yet remove all cases were
System.getProperty() or GetPropertAction() is used. I focused on the
problem areas first, but I plan to remove the rest as well.

Final note, this a draft version, I'm not looking for nitpicking
comments, just feedback on whether anyone disagrees with the overall
approach or has questions or suggestion.

I removed loadLibrary("javalang") from System.java because System
doesn't have any native methods anymore. If a VM depended on it, it
should probably be moved elsewhere (one of the VM* classes). It may also
be necessary to replace some System.loadLibrary() calls with
Runtime.getRuntime().loadLibrary() to prevent System from being
initialized too early (and that would also require fixing
Runtime.loadLibrary() to not call System.mapLibraryName()).

Comments?

BTW, I've attached the new files separately because I'm a Windows luser
and can't figure out how to get my Windows cvs client to include the new
files in the diff.

Regards,
Jeroen

Attachment: VMSystemProperties.java
Description: VMSystemProperties.java

Attachment: SystemProperties.java
Description: SystemProperties.java

Attachment: SystemProperties.patch
Description: SystemProperties.patch


reply via email to

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