From owner-freebsd-java Sat Aug 18 11: 0:21 2001 Delivered-To: freebsd-java@freebsd.org Received: from mgr2.xmission.com (mgr2.xmission.com [198.60.22.202]) by hub.freebsd.org (Postfix) with ESMTP id A1DBE37B40C for ; Sat, 18 Aug 2001 11:00:12 -0700 (PDT) (envelope-from glewis@misty.eyesbeyond.com) Received: from [166.70.6.193] (helo=misty.eyesbeyond.com) by mgr2.xmission.com with esmtp (Exim 3.22 #1) id 15YAOJ-0005ui-00; Sat, 18 Aug 2001 12:00:12 -0600 Received: (from glewis@localhost) by misty.eyesbeyond.com (8.11.3/8.11.3) id f7IHxs119696; Sun, 19 Aug 2001 03:29:54 +0930 (CST) (envelope-from glewis) Date: Sun, 19 Aug 2001 03:29:54 +0930 From: Greg Lewis To: Brian Skrab Cc: freebsd-java@FreeBSD.ORG Subject: Re: FBSD 4.4-RC && Linux JDK 1.3.1 && JNI ??? Message-ID: <20010819032954.A19679@misty.eyesbeyond.com> References: <20010817230420.B87454-100000@pinky.us.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010817230420.B87454-100000@pinky.us.net>; from bgs@pinky.us.net on Fri, Aug 17, 2001 at 11:13:37PM -0400 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 On Fri, Aug 17, 2001 at 11:13:37PM -0400, Brian Skrab wrote: > 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. [snip] > > 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. Install the linux-devel port and compile with the build tools supplied by it or build the shared library on a Linux box. You can't mix object formats. -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Phone : (801) 765 1887 Information Technology Web : http://www.eyesbeyond.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message