Problem compiling apache libraries

Marco Trudel mtrudel@gmx.ch
Fri Feb 9 13:10:00 GMT 2007


Andrew Haley wrote:
> Mohsen Saboorian writes:
>  > By compiling jar files into object files, I'll no more need to add
>  > those jar files in classpath, right?
> 
> Right.

I'd say it depends on what you exactly do. If you only have jars, then 
you don't need them any longer. If you compile a java source together 
with the jar like:

gcj -fjni --main=MyApp MyApp.java swt-win32.o [-Iswt-win32.jar]

Then of course, you still need the jars in the classpath in order to 
allow ecj1 to compile MyApp.java.

BTW Andrew: Good thinking with "-fjni"! Thats really one that likes to 
bring headaches and I think the best among us already spent at least a 
quarter of an hour searching the problem at another place :-(


Marco



More information about the Java mailing list