[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bootstrap sequence and core classes
From: |
Mark Wielaard |
Subject: |
Re: Bootstrap sequence and core classes |
Date: |
05 Oct 2002 20:50:24 +0200 |
Hi,
On Sat, 2002-10-05 at 16:13, Brian Jones wrote:
> Mark Wielaard <address@hidden> writes:
>
> > The static code block in Object (<clinit>) is only there because we have
> > our own JNI implementation of Object.getClass(). But I think that
> > normally a VM would special case that call anyway so I would like to
> > move that call to VMObject.
>
> There is always some sequence of things to load in order for the VM to
> start executing bytecode. It starts with loading the class with
> main() and continues to super classes, things those use, and
> eventually hitting Object. The things Object depends on shouldn't
> make or break a VM, at least by my reading of the JVM specification
> there is no special casing of Object. Why would we not keep the
> loadLibrary and the native methods in Object?
I was just studying the VM interface and noticed that Kissme for example
uses their own java.lang.Object class with the following comment:
// Note: Kissme's implementation of java.lang.Runtime.nativeLoad
// causes mayhem if it is called too early in the VM startup.
// Commenting out the call to System.loadLibrary("javalang")
// below fixes the problem. -- Steve Crawley : 2002-02-24
But besides that static block they seem to be able to use everything.
So I was wondering if other VMs had problems with this and/or if the
Classpath boot/core classes depend on this load order.
Cheers,
Mark