This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gstreamer-java don't work with GCJ


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]