From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26380 invoked by alias); 9 Sep 2011 20:57:08 -0000 Received: (qmail 26372 invoked by uid 22791); 9 Sep 2011 20:57:07 -0000 X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_GC,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-yi0-f47.google.com (HELO mail-yi0-f47.google.com) (209.85.218.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Sep 2011 20:56:54 +0000 Received: by yia28 with SMTP id 28so1267058yia.20 for ; Fri, 09 Sep 2011 13:56:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.108.73 with SMTP id g9mr840623icp.139.1315601813581; Fri, 09 Sep 2011 13:56:53 -0700 (PDT) Received: by 10.42.7.206 with HTTP; Fri, 9 Sep 2011 13:56:53 -0700 (PDT) Date: Fri, 09 Sep 2011 20:57:00 -0000 Message-ID: Subject: Why GCJ won't load my plugin when compiling bytecode? From: Li junsong To: java@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 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: 2011-09/txt/msg00000.txt.bz2 Hi there, I have a java source code Welcome.java, and my plugin's name is findvar.so. To avoid things getting complex, I write a very simple plugin, printing out Hello when loaded(printing hello in initial function). My plugin can be loaded if GCJ compiles source code to native machine code, that is if I type: gcj-4.6 -fplugin=findvar.so Welcome.java --main=Welcome Hello is then output to screen, and a.out is produced. But it won't work if GCJ compiles source code to java bytecode gcj-4.6 -fplugin=findvar.so -C Welcome.java --main=Welcome Nothing is promoted, only Welcome.class is produced. Does that mean that GCJ doesn't support -C and -fplugin at the same time? I really appreciate your answer. J. Li