This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
Re: Does gcj support java program containing native c function?
- To: "Liu, Guangsheng" <Guangsheng dot Liu at Dialogic dot com>
- Subject: Re: Does gcj support java program containing native c function?
- From: Jeff Sturm <jeff dot sturm at appnet dot com>
- Date: Mon, 23 Oct 2000 13:05:03 -0400
- CC: "'java-discuss at sourceware dot cygnus dot com'" <java-discuss at sourceware dot cygnus dot com>
- Organization: Commerce One
- References: <6B0F0A1F0F44D1118BB000A024620EB50742B47A@exchange2nj.dialogic.com> <877l6zbjb8.fsf@creche.cygnus.com>
- Reply-To: jeff dot sturm at commerceone dot com
Tom Tromey wrote:
>
> >>>>> ">" == Liu, Guangsheng <Guangsheng.Liu@Dialogic.com> writes:
>
> >> java.lang.UnknownError: Runtime.loadLibrary not implemented
> >> By the way, I am using Red Hat 6.2, Java JDK1.2.2, libgcj 2.95.1.
> >> Any idea or suggestion will be highly appreciated.
>
> JNI wasn't implemented when libgcj 2.95.1 was released.
> However, it has been implemented since then.
> If you try a newer gcj+libgcj, your example ought to work.
An alternative for C++/Java integration is CNI, if you aren't concerned about
portability to other Java runtimes. CNI is used throughout libgcj, and is much
more streamlined than JNI.
--
Jeff Sturm
jeff.sturm@commerceone.com