From owner-freebsd-java Tue Nov 10 09:05:32 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA17606 for freebsd-java-outgoing; Tue, 10 Nov 1998 09:05:32 -0800 (PST) (envelope-from owner-freebsd-java@FreeBSD.ORG) Received: from ns.mt.sri.com (sri-gw.MT.net [206.127.105.141]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA17599 for ; Tue, 10 Nov 1998 09:05:31 -0800 (PST) (envelope-from nate@mt.sri.com) Received: from mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by ns.mt.sri.com (8.8.8/8.8.8) with SMTP id KAA15837; Tue, 10 Nov 1998 10:05:09 -0700 (MST) (envelope-from nate@rocky.mt.sri.com) Received: by mt.sri.com (SMI-8.6/SMI-SVR4) id KAA11762; Tue, 10 Nov 1998 10:05:09 -0700 Date: Tue, 10 Nov 1998 10:05:09 -0700 Message-Id: <199811101705.KAA11762@mt.sri.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: tao@hmbrt.lbl.gov (Tao Zhen) Cc: java@FreeBSD.ORG In-Reply-To: <199811100738.XAA09337@hmbrt.lbl.gov> References: <199811100738.XAA09337@hmbrt.lbl.gov> X-Mailer: VM 6.34 under 19.16 "Lille" XEmacs Lucid Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > I was playing with the java native method example on the java tutorial > web page (http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/index.html) > I couldn't get this simple example work. I am using FreeBSD 3.0 and jdk1.1.6. > Here's how I created the shared library: > cc -shared -I/usr/local/java/include -I/usr/local/java/include/freebsd > HelloWorldImp.c -o libhello.so The JDK is an a.out binary, so you must use an a.out library to link against it. FreeBSD 3.0 uses ELF, so you must force it to create an a.out library (I don't know how) if you want to use JNI on FreeBSD 3.0. Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message