harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject Re: [classlib] where to put mods that make classlib more portable
Date Thu, 23 Mar 2006 23:42:34 GMT
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

> 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.

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.

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.


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.


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

View raw message