[fedora-java] The default java alternative?
Andrew Haley
aph at redhat.com
Wed May 6 13:39:01 UTC 2009
Stepan Kasal wrote:
> Hallo,
Hi.
> On Wed, May 06, 2009 at 11:12:30AM +0100, Andrew Haley wrote:
>> Stepan Kasal wrote:
>>> the differences between the two java's (e.g. that jni.h is installed
>>> to the default include path by gcj but not by openjdk, different
>>> javadocs) make the good old generic
>>> BuildRequires: java-devel
>>> very problematic, so I had to change it to
>>> BuildRequires: java-1.5.0-gcj-devel
>>>
>>> Well, my package builds fine with gcj and my conscience is clear as I
>>> have reported this, so all is fine. :-)
>> Sure, but it would make much more sense to look for jni.h in the right
>> place: then it would build with either. I would like to move jni.h out
>> of the compiler's default include path, but then God only knows what
>> else would break.
>
> well http://bugzilla.redhat.com/498964#c1 seems to recommend
> for i in -I/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/include{,/linux}; do
> java_inc="$java_inc $i"
> done
> %configure CPPFLAGS="$java_inc"
>
> But I'm afraid that this might not work with gcj or java-1.7.0-opejdk
> (if it existed).
That's wrong. Use "-I/usr/lib/jvm/java/include/"
Symlinks work like this:
/usr/lib/jvm/java -->
/etc/alternatives/java_sdk -->
/usr/lib/jvm/java-1.6.0-openjdk.x86_64 -->
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64
or, if gcj is installed instead,
/usr/lib/jvm/java -->
/etc/alternatives/java_sdk -->
/usr/lib/jvm/java-1.5.0-gcj -->
/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0
Andrew.
More information about the fedora-devel-java-list
mailing list