[Xapian-discuss] java bindings 1.0.0 - jni.h not found

Olly Betts olly at survex.com
Wed May 30 18:30:01 BST 2007

On Wed, May 30, 2007 at 07:21:31PM +0200, Martin Kuen wrote:
> The problem is that the header-file "jni.h" includes another file called
> "jni_md.h" (#include "jni_md.h"). This file is in a system-specific
> subdirectory of "path-to-jvm/include", that is called sth. like solaris,
> linux or windows.
> read: http://java.sun.com/products/jdk/faq/jni-j2sdk-faq.html#jni_md
> The the configure script has to add this subdirectory to the buildpath as
> well.

Oh right - this issue is actually already documented in java/README:

  JDK specific issues:

  Sun JDK 1.5 on Linux reportedly need a -I for the linux subdirectory of the
  JDK includes.  So you might need to configure with something like:

  ./configure CPPFLAGS="-I/path/to/jdk/include -I/path/to/jdk/include/linux"

It would be nice to be able to automatically do that, but I don't really
see how to know what subdirectory to look for - I assume Sun do this
because they envisage that different platforms might share a JDK install
so just looking for "/path/to/jdk/include/*/jni_md.h" isn't a good
approach - it also relies on the name of an internal header.

If anyone can see a good approach, do speak up!


More information about the Xapian-discuss mailing list