harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven de Marothy <s...@physto.se>
Subject The Classpath VM interface. (Please read)
Date Mon, 06 Jun 2005 18:29:59 GMT
Hi,
Ok, the amount of confusion going on is just amazing.
I'll try to recapitulate what the actual situation and actual issues
are.

It is of course impossible to implement a java class library completely
independently of the Virtual Machine. The VM must be able to provide
certain basic, core things.

Sun has not documented how their VM works with rt.jar. Therefore it is
not possible to develop a Sun class library-compatible VM in a
clean-room fashion. 

The GNU Classpath library has solved this problem by abstracting these
VM-specific parts in a documented[1] VM interface with a reference
implementation[2].

VMs using classpath need only implement this interface to use Classpath
without any modifications of the library. JamVM and JikesRVM[3] and ORP
among others do this. SablemVM can optionally use a Classpath library
without modification, but includes its own due to creative differences.

You are not REQUIRED to use Classpath via the VM interface of course, if
you don't mind reimplementing the parts which depend on the VM interface
(not much work). 

This is not a good idea though, because it makes merging GNU Classpath
changes in more difficult. If the Classpath VM interface isn't good
enough, then I suggest work be put to improving it instead.

The issue here is NOT that Classpath doesn't have an interface allowing
for VM independence.

The only real issues raised so far (that I've seen), are the following:

1) GNU Classpath's VM interface doesn't include things necessary for
J2SE 5.

(My take on it: There is no VM which needs them yet.)

2) GNU Classpath's VM interface uses language protection such as
package-privacy to hide the VM classes. 

(My take on it: Why is that a problem?)

3) If Harmony commits itself to using the Classpath VM interface, it
won't be able to use other class libraries.

(My take on it: The alternative being one with an undocumented
proprietary VM interface, and .. well, what else?)

/Sven

[1] http://www.gnu.org/software/classpath/docs/vmintegration.html
[2]
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/vm/reference/java/
[3] Apparently I was wrong about this previously, David Grove corrected
me. JikesRVM does use the Classpath VM interface.



Mime
View raw message