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

[fedora-java] libvirt-java bindings



  Hi,

I have just started to release and package java bindings for libvirt.
I have made a request for review for Fedora on the new package:
  https://bugzilla.redhat.com/show_bug.cgi?id=453119

I found the exercise rather hard, JNI is of course on the edge of the Java
land, but it's hard to find good resources to look at for Java bindings
in Fedora, the gnome-java stuff seems very specific, and a lot of packages
basically rely on gcj for compilation of any JNI stuff.

I would like something more flexible, to that end I added some JDK dynamic
detection in configure.in for my package, which then allows to guess the
jni.h and jni_md.h based on the javah and javac used to generate the bindings
(so things should stay consistent).
In the spec file I used the following:

%define java	java
and
Requires:	%{java} >= 1.5.0
BuildRequires:	%{java}-devel >= 1.5.0

 to easilly allow the user to specify more strictly what java development
package to use. I don't know if this is sufficient in general for the
previous versions of Fedora, it seems to work with java-1.6.0-openjdk
in F-9 or something as old as java-1.5.0-ibm-1.5.0.7 on a RHEL-4 box,
but the java class compilations break for example with java-1.5.0-gcj [-devel]
on Fedora-8 (didn't tried icedtea yet, though I guess that would work)
this looks related to dependancies when compiling a bunch of .java
together in one command as 

   /usr/bin/javac -classpath "org/libvirt" org/libvirt/*.java
   2. ERROR in org/libvirt/VirConnectAuthDefault.java (at line 14)
   	credType= new  VirConnectCredential.VirConnectCredentialType[] {
	^^^^^^^^
	credType cannot be resolved

though VirConnectCredential.java is there and defines the type.

  Portability tricks and eyeballs for the review would be very welcome !
(as well as patches to improve the package source of course but that
would be best conducted on the libvirt list).

   thanks in advance,

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/


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