harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weldon Washburn" <weldon...@gmail.com>
Subject Re: [classlib] where to put mods that make classlib more portable
Date Fri, 24 Mar 2006 04:50:36 GMT
On 3/23/06, Tim Ellison <t.p.ellison@gmail.com> wrote:
> Weldon Washburn wrote:
> > Now that JCHEVM licensing issues are resolved, I would like to find a
> > home for mods that make Harmony Classlib more portable.  The files
> > are:
> >
> > nio/src/main/java/com/ibm/platform/OSMemory.java
> > nio/src/main/java/com/ibm/platform/OSFileSystem.java
> > luni/src/main/java/java/io/FileDescriptor.java
> >
> > All of the above files contain native method declarations.  To get
> > "hello world" on JCHEVM working,  I temporarily commented out the
> > "native" keyword and turned the code into method definitions with a
> > few simple hacks.
>
> That's cool -- as Leo said, it is fair game to create hacks to bring up
> "hello world".  It's a step towards the full integration of JCHEVM and
> classlib.
>
> > Since the above files declare native methods, one possibility is to
> > move them into the kernel directory.  Another possibility is to leave
> > the above files where they are and have them call into
> > "kernel/src/main/java/java/lang/kernel_OSMemory.java".  The idea is to
> > move all the native method declarations into the kernel directory.
> >
> > Thoughts on the above?
>
> As Paulex said elsewhere, you are going to have to do 'the right thing'
> in terms of the VMI if you expect other natives to work.

Yes, I agree.  The problem will be resolving GNU Classpath hard
requirements and the Harmony ClassLib hard requirements.

>
> I'm surprised that these are the only natives that you need to change
> (to avoid the PORT_ACCESS_FROM_ENV and hy* macros) outside the kernel today.

More accurately, these are the only natives required to get "hello
world" working.
>
> Are you using the Harmony launcher for starting JCHEVM?  I ask because
> the launcher sets up the portlib and passes it in as a vm arg when the
> VM is created.

Harmony launcher is not used.  I suspect the typical GNU Classpath
ready JVM does not know about Harmony launcher.
>
> Regards,
> Tim
>
> p.s. I don't think putting these hacks into the existing mainline
> classlib code makes sense, but I have no problem with it being off to
> the side if that helps with collaboration.

Yes.  Agreed.  I will keep them off to the side.


>
> --
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>


--
Weldon Washburn
Intel Middleware Products Division

Mime
View raw message