Re: libvirt-java bindings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mary Ellen Foster wrote:
> 2008/7/1 David Walluck <david@xxxxxxxx>:
>> Mary Ellen Foster wrote:
>> | I have one recent package that does this (specifies openjdk on F9+ and
>> | icedtea on F8) and one that doesn't (just wants java >= 1.5). The
>> | first package uses JNI and needs a Sun-like JVM to work (or at least
>> | it took more autotools hacking than I cared to try to make it work),
>> | and if I just put Requires: java it tended to grab gcj. I guess I
>> | could also put java > 1.5, but the issue isn't the 1.5-ness, it's the
>> | Sun-style JNI classes.
>>
>> This is not an issue with the java-devel packages, but rather an issue
>> with either the upstream configure or an issue with the GCJ packaging.
>>
>> If it is lack of JNI support in GCJ, that is one thing. If it is simply
>> that the package is expecting a differnt layout that is another.
> 
> I just did a bit of hacking, and it is possible to build the package
> against gcj instead of openjdk. There were two things to fix:
> - the "configure" script followed symlinks from javac to find the JNI
> include dir. Since the symlinks for gcj ground out at /usr/bin/ecj, it
> ended up looking for /usr/include/jni.h.

Hmm.  This package assumes that the chain of symlinks ends at the installed
binary, which must be in the jdk dir.

/usr/bin/javac -->
/etc/alternatives/javac -->
/usr/lib/jvm/java-1.4.2-gcj/bin/javac -->
/usr/bin/ecj

?

> - It also wanted to hardcode "-ljava -lverify -ljvm" on the gcc line,
> which isn't right for gcj

No.  I'm surprised it's right for Java either; libjvm and libverify
I'd expect.

> But I'm not sure if I want to make these modifications to the package.
> If I build a JNI program against gcj, can the resulting .so be used
> with Sun-like JVMs? How does this work? Is it documented anywhere?

I think so.

Andrew.

--
fedora-devel-java-list mailing list
fedora-devel-java-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-java-list

[Index of Archives]     [Red Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux