Question: System.initializeSystemClass()

Christian Thalinger christian.thalinger at gmail.com
Sun Jan 11 09:36:49 PST 2009


On Sun, 2009-01-11 at 17:19 +0100, Ulf Zibis wrote:
> MY QUESTION:
> Is there any risk, to load zip library before opening the standard I/O 
> streams out and err ?

<snip>

> 
> The only problem I see is, that if loadLibrary("zip") fails, the 
> exception messages can't be propagated to standard err stream.
> 
> What you guys do you think?

libzip.so is loaded by the VM during startup before
System.inializeSystemClass() is called.  So the loadLibrary("zip") does
not load the library anymore, it already happened.

And when the zip library is missing, you get an error message like this:

Error occurred during initialization of VM
Unable to load ZIP library: /export/home/twisti/projects/openjdk/openjdk-6-src-b14/j2sdk-image/jre/lib/amd64/libzip.so

printed by a VM method.  And not Java code using err stream.  Moving the
statement shouldn't matter.  It's just there in case (I wonder what
case).

- Christian




More information about the hotspot-dev mailing list