From owner-freebsd-java Fri Aug 17 20:19:17 2001 Delivered-To: freebsd-java@freebsd.org Received: from jupiter.linuxengine.net (jupiter.linuxengine.net [209.61.188.254]) by hub.freebsd.org (Postfix) with ESMTP id BEF5C37B40E for ; Fri, 17 Aug 2001 20:19:14 -0700 (PDT) (envelope-from john@utzweb.net) Received: from jupiterweb.commercevault.com (jupiterweb.commercevault.com [209.61.179.16] (may be forged)) by jupiter.linuxengine.net (8.11.0/8.11.0) with ESMTP id f7I3Q6A25845; Fri, 17 Aug 2001 22:26:06 -0500 Date: Fri, 17 Aug 2001 22:26:06 -0500 (CDT) From: John Utz X-X-Sender: To: Brian Skrab Cc: Subject: Re: FBSD 4.4-RC && Linux JDK 1.3.1 && JNI ??? In-Reply-To: <20010817230420.B87454-100000@pinky.us.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org ack! this is about perverse! so, i suspect that your problem is that you are trying to call a FreeBSD native lib instead of a linux one. other smarter peep's may have a better answer, but i think that you need to either: compile you jni stuff to be a linux lib, not a FreeBSD one use a FreeBSD native jvm. but i dunno if 1.1.8 actually knows about jni. i cant recall. On Fri, 17 Aug 2001, Brian Skrab wrote: > Hello, > > I've just dipped my big toe into the dark and mysterious pool of the > Java Native Interface. I've implemented a simple HelloWorld style > application with a native C implementation of the print method, and > have managed to get to the final step of running the class only to > receive the following error: > > jnitest.so: /usr/home/bgs/bin/libjnitest.so: ELF file OS ABI invalid. > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1306) > at java.lang.Runtime.loadLibrary0(Runtime.java:749) > at java.lang.System.loadLibrary(System.java:820) > at JNITest.(JNITest.java:5) > > I am using the Linux JDK 1.3.1 port and am unsure about where to go > from here. Is there something special that I must do when compiling > the native code to make it properly executable? I've seen brandelf > mentioned in a few archives that I've searched in, but have tried > using it with no success. > > Anyone know the secret incantations to make JNI work with a Linux > JDK? Any pointers, tips, or *examples* are very much appreciated. > > Thank you, > > ~brian skrab > bgs@pinky.us.net > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-java" in the body of the message > -- John L. Utz III john@utzweb.net Idiocy is the Impulse Function in the Convolution of Life To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message