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: Help using -I


> +
> +main:	bob/Main.java	bob/Bob.java
> +	javac bob/Bob.java
> +	jar cvf bob.jar bob/Bob.class
> +	gcj --main=bob.Main -I bob.jar -o $@ $<

I also had problems working out the -I switch. In your case because you
want to compile the jar the -I is not relevant and I think the jar file
should be the main argument to gcj.

gcj --main=bob.Main bob.jar

What I didn't realise about -I is that if you want to compile against
several libraries you have to specify -I for each one.

gcj -I./lib/LibOne.jar -I./lib/LibTwo.jar ...

I couldn't get this to work:

gcj -I./lib/LibOne.jar:./lib/LibTwo.jar ...

Now this is probably obvoius to someone coming from a gcc background but
I was coming from a java background so it took a while to figure :)




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]