|
|
| java bindings 1.0.0 - jni.h not found |

|
2007-05-30 10:28:48 |
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
_______________________________________________
Xapian-discuss mailing list
Xapian-discuss lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-discuss
a>
|
|
| Re: java bindings 1.0.0 - jni.h not
found |
  United Kingdom |
2007-05-30 10:32:12 |
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
_______________________________________________
Xapian-discuss mailing list
Xapian-discuss lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-discuss
a>
|
|
| Re: java bindings 1.0.0 - jni.h not
found |
  Germany |
2007-05-30 10:36:15 |
On Wed, 2007-05-30 at 16:32 +0100, James Aylett wrote:
> 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...
And - more on topic - did you install 'sun-java5-jdk'?
That's the packet
that provides this file ...
HTH Ralf Mattes
> J
>
_______________________________________________
Xapian-discuss mailing list
Xapian-discuss lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-discuss
a>
|
|
| Re: java bindings 1.0.0 - jni.h not
found |

|
2007-05-30 10:57:54 |
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
>
>
>
>
_______________________________________________
Xapian-discuss mailing list
Xapian-discuss lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-discuss
a>
|
|
| Re: Re: java bindings 1.0.0 - jni.h not
found |
  United Kingdom |
2007-05-30 11:08:20 |
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
a>
|
|
| Re: Re: java bindings 1.0.0 - jni.h not
found |
  Germany |
2007-05-30 11:09:58 |
bvOn Wed, 2007-05-30 at 17:57 +0200, Martin Kuen wrote:
> 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
Ah - just checked locally (don't use java that much):
% dpkg -L sun-java5-jdk |grep jni.h
/usr/lib/jvm/java-1.5.0-sun-1.5.0.11/include/jni.h
Hmm - looks like the configure script looksin the wrong
place. As a
quick fix you might try to link
/usr/lib/jvm/java-1.5.0-sun-1.5.0.11/
to /usr/lib/jvm/java-1.5.0-sun/
Cheers, RalfD
> 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
> >
> >
> >
> >
> _______________________________________________
> Xapian-discuss mailing list
> Xapian-discuss lists.xapian.org
> http://lists.xapian.org/mailman/listinfo/xapian-discuss
a>
_______________________________________________
Xapian-discuss mailing list
Xapian-discuss lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-discuss
a>
|
|
| Re: Re: java bindings 1.0.0 - jni.h not
found |

|
2007-05-30 11:36:54 |
$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
a>
>
_______________________________________________
Xapian-discuss mailing list
Xapian-discuss lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-discuss
a>
|
|
| Re: Re: java bindings 1.0.0 - jni.h not
found |
  United Kingdom |
2007-05-30 11:46:47 |
On Wed, May 30, 2007 at 06:36:54PM +0200, Martin Kuen
wrote:
> $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.
Okay, if you're getting to jni.h then JAVA_HOME is fine. The
problem
may be a compilation failure, rather than that the file is
missing. If
you look in config.log, it may contain more information
about the
failure.
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
a>
|
|
| Re: Re: java bindings 1.0.0 - jni.h not
found |
  Germany |
2007-05-30 11:48:32 |
On Wed, 2007-05-30 at 18:36 +0200, Martin Kuen wrote:
> $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.
Well - the question then is: what does 'locate jni.h' say?
It _should_ be there - according to dpkg.
Cheers, RalfD
>
> 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
a>
> >
> _______________________________________________
> Xapian-discuss mailing list
> Xapian-discuss lists.xapian.org
> http://lists.xapian.org/mailman/listinfo/xapian-discuss
a>
_______________________________________________
Xapian-discuss mailing list
Xapian-discuss lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-discuss
a>
|
|
| Re: java bindings 1.0.0 - jni.h not
found |
  United Kingdom |
2007-05-30 11:51:27 |
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
_______________________________________________
Xapian-discuss mailing list
Xapian-discuss lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-discuss
a>
|
|