From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17092 invoked by alias); 15 Feb 2008 18:24:49 -0000 Received: (qmail 17082 invoked by uid 22791); 15 Feb 2008 18:24:47 -0000 X-Spam-Check-By: sourceware.org Received: from 82-69-231-45.dsl.in-addr.zen.co.uk (HELO wellington.simple.org) (82.69.231.45) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 15 Feb 2008 18:24:28 +0000 Received: from [10.0.1.4] (82-69-231-41.dsl.in-addr.zen.co.uk [82.69.231.41]) by wellington.simple.org (Postfix) with ESMTP id 6FAC0709CED for ; Fri, 15 Feb 2008 18:24:25 +0000 (GMT) Message-ID: <47B5D8ED.8050609@iee.org> Date: Fri, 15 Feb 2008 18:24:00 -0000 From: Andrew W User-Agent: Thunderbird 1.5.0.14pre (X11/20071023) MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Re: Forward declaration of classes needed when using GCJ? References: <47AF31F9.2060209@iee.org> <47B08AB2.3080508@avtrex.com> <47B0C58C.7080801@iee.org> <47B0CE17.6080408@avtrex.com> <47B1C41E.4070408@iee.org> In-Reply-To: <47B1C41E.4070408@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/msg00187.txt.bz2 OK I've solved the problem when you've just got the two simple classes A & B. It seems is obscurely fussy about the current working directory. It insists the current directory is the root of the project and you specify the .java files as a sub path below that it will NOT allow you to have the package dir containing the .java files as the current directory. i.e cd /path/to/project gcj --main=net.mydomain.core.ClassA ./net/mydomain/core/ClassA.java ./net/mydomain/core/ClassB.java WILL work cd /path/to/project/net/mydomain/core/ gcj --main=net.mydomain.core.ClassA ./ClassA.java ./ClassB.java will NOT Anyway. If you then try linking against jar files using --classpath= you're back to square 1. Taking the above example (the 1st one) if you copy any .JAR file to /path/to/project/ then do gcj --main=net.mydomain.core.ClassA ./net/mydomain/core/ClassA.java ./net/mydomain/core/ClassB.java --classpath='./lo4j-1.2.8.jar' you get the same error about not recognising ClassB. Even appending the current dir onto the end of the classpath doesnt solve it. Any ideas? Regards Andrew