JNI support?

Tim Wilkinson tim at tjwassoc.co.uk
Wed May 14 16:14:40 PDT 1997


Nelson Minar wrote:
> 
> Per Bothner explained:
> >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?

I wondered if it standardies threads and locking myself.

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

In theory you can do this now.  Any JIT version of Kaffe uses a C
calling convention for method invocation - in theory therefore you can
call a native function in a "dropped in" library without a problem. 
People have tried this with AWT from Java-Linux but unforunately you
need to have a dynamic Motif library available to do this.

Tim

--
  Tim Wilkinson                         Tel/Fax: +44 181 440 0658
  T. J. Wilkinson & Associates,         Mobile:  +44 370 621006
  London, UK.                           Email:   tim at tjwassoc.co.uk



More information about the kaffe mailing list