Hi all, I am new to Xapian and want to use it with Java. In order to do that I tried to compile the Java bindings. I set XAPIAN_CONFIG and invoked "configure". However "./configure --with-java" exits with an error. Point of failure: checking for jni.h... no checking for jni.h in /usr/lib/jvm/java-1.5.0-sun/include... no checking for jni.h in /usr/lib/jvm/java-gcj/include... no checking for jni.h in /System/Library/Frameworks/JavaVM.framework/Headers... no configure: error: jni.h not found Note that I have added JAVA_HOME to my path and if I look into the directory "/usr/lib/jvm/java-1.5.0-sun/include" there is a "jni.h" file - This directory does not appear if I don't set JAVA_HOME. Next I tried to set the variable JNI_INCLUDE_DIR. No effect at all. The script claims to look in the proper location, but doesn't find anything. OS: Ubuntu 7.04 gcc/g++: Ubuntu 4.1.2-0ubuntu4 (gcc/g++ version 4.1.2 as ubuntu package) Any ideas? Cheers, Martin
On Wed, May 30, 2007 at 05:28:48PM +0200, Martin Kuen wrote:> Note that I have added JAVA_HOME to my path and if I look into the > directory "/usr/lib/jvm/java-1.5.0-sun/include" there is a "jni.h" > file - This directory does not appear if I don't set JAVA_HOME.Erm... JAVA_HOME needs to be added to your *environment*, not your path... J -- /--------------------------------------------------------------------------\ James Aylett xapian.org james@tartarus.org uncertaintydivision.org
Martin Kuen
2007-May-30 16:58 UTC
[Xapian-discuss] Re: java bindings 1.0.0 - jni.h not found
Hi again, ok - for clarification: 1. "add JAVA_HOME to my path": yes I added it to my *environment* - wrong terminology, my fault 2. java-package: yes, the (ubuntu-packaged) jdk is installed cu, Martin On 5/30/07, Martin Kuen <martin.kuen@gmail.com> wrote:> > Hi all, > > I am new to Xapian and want to use it with Java. In order to do that I > tried to compile the Java bindings. I set XAPIAN_CONFIG and invoked > "configure". However "./configure --with-java" exits with an error. > > Point of failure: > checking for jni.h... no > checking for jni.h in /usr/lib/jvm/java-1.5.0-sun/include... no > checking for jni.h in /usr/lib/jvm/java-gcj/include... no > checking for jni.h in > /System/Library/Frameworks/JavaVM.framework/Headers... no > configure: error: jni.h not found > > Note that I have added JAVA_HOME to my path and if I look into the > directory "/usr/lib/jvm/java-1.5.0-sun/include" there is a "jni.h" file - > This directory does not appear if I don't set JAVA_HOME. > > Next I tried to set the variable JNI_INCLUDE_DIR. No effect at all. > > The script claims to look in the proper location, but doesn't find > anything. > > OS: Ubuntu 7.04 > gcc/g++: Ubuntu 4.1.2-0ubuntu4 (gcc/g++ version 4.1.2 as ubuntu package) > > Any ideas? > > > Cheers, > > Martin > > > >
James Aylett
2007-May-30 17:08 UTC
[Xapian-discuss] Re: java bindings 1.0.0 - jni.h not found
On Wed, May 30, 2007 at 05:57:54PM +0200, Martin Kuen wrote:> 1. "add JAVA_HOME to my path": yes I added it to my *environment* - wrong > terminology, my faultCool. What does echo $JAVA_HOME say? J -- /--------------------------------------------------------------------------\ James Aylett xapian.org james@tartarus.org uncertaintydivision.org
Martin Kuen
2007-May-30 17:37 UTC
[Xapian-discuss] Re: java bindings 1.0.0 - jni.h not found
$JAVA_HOME says: "/usr/lib/jvm/java-1.5.0-sun" which is a link to "./java-1.5.0-sun-1.5.0.11" I tried to set JAVA_HOME to the real directory as well. No change. Martin On 5/30/07, James Aylett <james-xapian@tartarus.org> wrote:> > On Wed, May 30, 2007 at 05:57:54PM +0200, Martin Kuen wrote: > > > 1. "add JAVA_HOME to my path": yes I added it to my *environment* - > wrong > > terminology, my fault > > Cool. What does echo $JAVA_HOME say? > > J > > -- > > /--------------------------------------------------------------------------\ > James Aylett xapian.org > james@tartarus.org uncertaintydivision.org > > _______________________________________________ > Xapian-discuss mailing list > Xapian-discuss@lists.xapian.org > http://lists.xapian.org/mailman/listinfo/xapian-discuss >
On Wed, May 30, 2007 at 05:28:48PM +0200, Martin Kuen wrote:> Point of failure: > checking for jni.h... no > checking for jni.h in /usr/lib/jvm/java-1.5.0-sun/include... no > checking for jni.h in /usr/lib/jvm/java-gcj/include... no > checking for jni.h in > /System/Library/Frameworks/JavaVM.framework/Headers... no > configure: error: jni.h not found > > Note that I have added JAVA_HOME to my path and if I look into the directory > "/usr/lib/jvm/java-1.5.0-sun/include" there is a "jni.h" file - This > directory does not appear if I don't set JAVA_HOME.As James says, config.log should show why this jni.h isn't being picked up. The test just tries to compile: #include <jni.h>> Next I tried to set the variable JNI_INCLUDE_DIR. No effect at all.JNI_INCLUDE_DIR is never actually used! I'll fix that, but the problem here seems to be the test for jni.h.> OS: Ubuntu 7.04 > gcc/g++: Ubuntu 4.1.2-0ubuntu4 (gcc/g++ version 4.1.2 as ubuntu package)That's what I'm using, so if it's not obvious what's up from config.log I can investigate. Cheers, Olly