JNI support?

descarte at hermetica.com descarte at hermetica.com
Wed May 14 17:18:35 PDT 1997

> >What JNI provides is the ability to use a *machine code* library from
> >another vendor, *if* it has been compiled for the same architecture
> >and calling convention (and uses the JNI).
> Does this mean that the JNI standardizes things like the memory layout
> of objects?

No, it provides function tables for each VM implementation to supply
their own object layouts if desired. By using this additional layer
of indirection, JNI code becomes portable.

> >For Kaffe, JNI as an ABI has limited usefulness, especially if
> >you are running on a platform that is not comerically popular.
> >How many Netscape plug-ins run on Linux?  Except for those available
> >with source code - very few.  JNI libraries will be the same.
> How about libawt and other compiled code that's part of the JDK? It
> would be really really nice to be able to take these libraries and
> drop them into kaffe. They may not be Free, and the JNI may be slow,
> but at least they do work.

I'd be impressed if the awt libraries distributed with the JDK are JNI-coded.
Given that Sun left the JDK-1.0 interface in place, the effort to port
AWT would be quite large. However, I don't know for sure.

And, I've been doing quite a lot of testing with the JNI. It is slower than
the JDK/RNI interfaces, but not drastically so, if used correctly. Well-written
JNI code is still faster than JIT, for the moment, at least.


Alligator Descartes       |
descarte at hermetica.com    |   "Lobey est le petit garcon!" -- Bud Neill
http://www.hermetica.com  |

More information about the kaffe mailing list