Having some trouble building a simple app.

Mark Wielaard mark@klomp.org
Wed Feb 22 11:11:00 GMT 2006

Hi Patrick,

On Tue, 2006-02-21 at 23:33 -0500, Patrick Twohig wrote:
> Both .java files are part of the same package and live in the same
> directory!  I even tried invoking gcj as gcj -I.  I'm not sure what i'm
> doing wrong and why it errors out at that point.  Does anybody have any
> suggestions?

If they are not part of the no-name default package then you need to
invoke gcj at the "root of your package" hierarchy. Otherwise gcj will
not know where to look for a class. So if you have two classes A and B
in package p. Then you want to tell gcj to look for classes and source
files from the parent directory of p.

If we have for example the following files (class A and B part of
package p, inside myproject):

Then you would invoke gcj from /home/mark/src/myproject as gcj -c
p/A.java and gcj -c p/B.java

Hope that helps,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/java/attachments/20060222/e2ee6824/attachment.sig>

More information about the Java mailing list