From owner-freebsd-java Mon Nov 9 23:39:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA22261 for freebsd-java-outgoing; Mon, 9 Nov 1998 23:39:15 -0800 (PST) (envelope-from owner-freebsd-java@FreeBSD.ORG) Received: from PraetorianGuard.lbl.gov (mh1.lbl.gov [128.3.7.48]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA22255 for ; Mon, 9 Nov 1998 23:39:14 -0800 (PST) (envelope-from tao@hmbrt.lbl.gov) Received: from hmbrt.lbl.gov (hmbrt.lbl.gov [128.3.21.168]) by PraetorianGuard.lbl.gov (LBLPSB/SpamKiller) with SMTP id XAA01764 for ; Mon, 9 Nov 1998 23:38:59 -0800 (PST) Received: by hmbrt.lbl.gov (SMI-8.6/SMI-SVR4) id XAA09337; Mon, 9 Nov 1998 23:38:57 -0800 Date: Mon, 9 Nov 1998 23:38:57 -0800 From: tao@hmbrt.lbl.gov (Tao Zhen) Message-Id: <199811100738.XAA09337@hmbrt.lbl.gov> To: java@FreeBSD.ORG Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, there, 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 I've also tried ar and ranlib to create the library. However, when I run the program, it gives me the following error message: bad magic number in "./libhello.so" (libhello.so) Can't find class HelloWorld. Please help. BTW, my compiler is gcc2.7.2.1. Thanks. Tao To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message