This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Having some trouble building a simple app.


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):
/home/mark/src/myproject/p/A.java
/home/mark/src/myproject/p/B.java

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,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]