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

James Aylett james-xapian at tartarus.org
Thu May 31 11:45:09 BST 2007


On Thu, May 31, 2007 at 11:27:11AM +0100, Olly Betts wrote:

> > Could we rewrite the test so that in the jni.h fallback (which is what
> > will almost always actually find the appropriate CFLAGS) we first
> > check `test -f path/include/jni.h` then try compile as normal, and if
> > that fails on *linux* we try compile with -I path/include/linux as
> > well?
> 
> That only fixes this for Linux, and all the world isn't Linux.  The Sun
> webpage someone posted a link to hints that other possible values
> include "solaris" and "win32", but sadly it doesn't enumerate all the
> possible values.

Sorry, I thought you'd said that this problem only appeared on linux.

For the Sun JDK, there shouldn't be any other values, because they are
the only platforms they support. Annoyingly, there's no good way of
finding out which platform we're running (I was hoping
java.lang.System.getProperties() would help, but it works in terms of
processor type, not OS type).

No idea what the APPL one does; I only have the JRE on my Mac at the
moment.

> This almost makes me think that Sun are deliberately making it harder to
> compile JNI stuff to push a "pure Java" agenda.  After all jni.h could
> easily be written to avoid users having to worry about this at all since
> the compiler knows the target platform.

I'd be more inclined to believe that it was written by someone who
wasn't very good. Never ascribe to malice what can be explained by
incompetence, particularly in the case of Java.

(JNI was based on work done by Netscape.)

J

-- 
/--------------------------------------------------------------------------\
  James Aylett                                                  xapian.org
  james at tartarus.org                               uncertaintydivision.org



More information about the Xapian-discuss mailing list