From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32742 invoked by alias); 13 Feb 2012 03:01:29 -0000 Received: (qmail 32730 invoked by uid 22791); 13 Feb 2012 03:01:27 -0000 X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_GC X-Spam-Check-By: sourceware.org Received: from mail-iy0-f175.google.com (HELO mail-iy0-f175.google.com) (209.85.210.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Feb 2012 03:01:13 +0000 Received: by iaby12 with SMTP id y12so3742486iab.20 for ; Sun, 12 Feb 2012 19:01:12 -0800 (PST) Received: by 10.50.57.163 with SMTP id j3mr24117525igq.3.1329102072800; Sun, 12 Feb 2012 19:01:12 -0800 (PST) Received: from woodchuck.anu.edu.au (woodchuck.anu.edu.au. [150.203.163.117]) by mx.google.com with ESMTPS id l28sm24763824ibc.3.2012.02.12.19.01.11 (version=SSLv3 cipher=OTHER); Sun, 12 Feb 2012 19:01:12 -0800 (PST) Message-ID: <4F387D25.40406@gmail.com> Date: Mon, 13 Feb 2012 03:01:00 -0000 From: Yi Lin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0) Gecko/20120129 Thunderbird/10.0 MIME-Version: 1.0 To: java@gcc.gnu.org Subject: Interface gcj-compiled library with Java programs in a runtime (other than gij)? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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/msg00008.txt.bz2 Hi, I am wondering if we can use methods from a gcj-compiled library in uncompiled Java program(bytecode) executed on a VM. According to gcj FAQ 1.7, there is no problem to do this with 'gij' interpreter/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 uncompiled Java program with gcj-compiled library. Any information or reference about this will be appreciated. Many Thanks, Yi