From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6186 invoked by alias); 13 Feb 2012 04:01:07 -0000 Received: (qmail 6168 invoked by uid 22791); 13 Feb 2012 04:01:04 -0000 X-SWARE-Spam-Status: No, hits=0.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_GC X-Spam-Check-By: sourceware.org Received: from mail-tul01m020-f175.google.com (HELO mail-tul01m020-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Feb 2012 04:00:51 +0000 Received: by obhx4 with SMTP id x4so6511066obh.20 for ; Sun, 12 Feb 2012 20:00:51 -0800 (PST) Received: by 10.50.161.231 with SMTP id xv7mr9365788igb.0.1329105651006; Sun, 12 Feb 2012 20:00:51 -0800 (PST) References: <4F387D25.40406@gmail.com> From: Brian Jones In-Reply-To: <4F387D25.40406@gmail.com> Mime-Version: 1.0 (1.0) Date: Mon, 13 Feb 2012 04:01:00 -0000 Message-ID: <1586090240029193189@unknownmsgid> Subject: Re: Interface gcj-compiled library with Java programs in a runtime (other than gij)? To: Yi Lin Cc: "java@gcc.gnu.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2012-02/txt/msg00009.txt.bz2 I suggest you try jni to get to whatever native code you are interested in. Brian On Feb 12, 2012, at 10:01 PM, Yi Lin wrote: > Hi, > > I am wondering if we can use methods from a gcj-compiled library in uncom= piled Java program(bytecode) executed on a VM. > > According to gcj FAQ 1.7, there is no problem to do this with 'gij' inter= preter/runtime. You can compile some Java code into library (native code), = and run bytecode with 'gij' to invoke library methods. But this seems only = capable for 'gij', and other runtimes like HotSpot cannot load and link the= library properly. > > I want to know if there is a general solution to allow you interface unco= mpiled Java program with gcj-compiled library. Any information or reference= about this will be appreciated. > > Many Thanks, > Yi