This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gstreamer-java don't work with GCJ
- From: Andrew Haley <aph-gcc at littlepinkcloud dot COM>
- To: Frank Großmann <Frank dot Grossmann at gmx dot de>
- Cc: java at gcc dot gnu dot org
- Date: Mon, 13 Aug 2007 13:15:44 +0100
- Subject: Re: gstreamer-java don't work with GCJ
- References: <1187005834.25609.25.camel@fragro-laptop>
Frank Großmann writes:
> I'm new here and i have my first problem(s). :D I tried to use
> gstreamer-java binding from
> http://code.google.com/p/gstreamer-java/source and get errors from
> libgcj8 ... gstreamer Java uses JNA instead JNI.
The error is reported here:
private static class MemberOrder {
public int first;
public int middle;
public int last;
}
private static final boolean REVERSE_FIELDS;
static {
// IBM and JRockit store fields in reverse order; check for it
Field[] fields = MemberOrder.class.getFields();
REVERSE_FIELDS = "last".equals(fields[0].getName());
if (!"middle".equals(fields[1].getName())) {
throw new Error("This VM does not store fields in a predictable order");
}
}
The javadoc for Class.getFields() says "The elements in the array
returned are not sorted and are not in any particular order", but JNA
needs them to be in the order in which they were declared.
JNA looks like great technology, and it would be very cool to get it
working on gcj. I'm not sure how to fix his problem, though. Paging
Tom Tromey...
Andrew.