From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19959 invoked by alias); 11 Feb 2008 17:50:03 -0000 Received: (qmail 19950 invoked by uid 22791); 11 Feb 2008 17:50:02 -0000 X-Spam-Check-By: sourceware.org Received: from smtp1.dnsmadeeasy.com (HELO smtp1.dnsmadeeasy.com) (205.234.170.144) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 11 Feb 2008 17:49:43 +0000 Received: from smtp1.dnsmadeeasy.com (localhost [127.0.0.1]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP id 58379312D10; Mon, 11 Feb 2008 17:49:53 +0000 (UTC) X-Authenticated-Name: js.dnsmadeeasy X-Transit-System: In case of SPAM please contact abuse@dnsmadeeasy.com Received: from avtrex.com (unknown [67.116.42.147]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP; Mon, 11 Feb 2008 17:49:53 +0000 (UTC) Received: from dl2.hq2.avtrex.com ([192.168.7.26]) by avtrex.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 11 Feb 2008 09:49:39 -0800 Message-ID: <47B08AB2.3080508@avtrex.com> Date: Mon, 11 Feb 2008 17:50:00 -0000 From: David Daney User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Andrew W Cc: gcc-help@gcc.gnu.org Subject: Re: Forward declaration of classes needed when using GCJ? References: <47AF31F9.2060209@iee.org> In-Reply-To: <47AF31F9.2060209@iee.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-02/txt/msg00077.txt.bz2 Andrew W wrote: > Consider the following two classes placed in files > ./net/mydomain/core/ClassA.java and > ./net/mydomain/core/ClassB.java respectively: > > package net.mydomain.core; > public class ClassA > { > > public static void main(String[] args) throws Exception > { > ClassB classb = new ClassB(); > } > > } > > > package net.mydomain.core; > public class ClassB > { > > > } > > If I compile this using the 'normal' Java compiler like this: > javac ./net/mydomain/core/ClassA.java ./net/mydomain/core/ClassB.java > > it works fine. > > Using the GCJ command: > > gcj --main=ClassA ./net/mydomain/core/ClassA.java > ./net/mydomain/core/ClassB.java That should be: gcj --main=net.mydomain.core.ClassA ./net/mydomain/core/ClassA.java ./net/mydomain/core/ClassB.java David Daney