Static build failing to load classes

Andrew Pinski pinskia@physics.uc.edu
Wed Nov 16 23:03:00 GMT 2005


> 
> I'm trying to do a static build with today's gcj code.  With a trivial java
> program,
> it crashes, apparently unable to load a class I'm reasonably sure is
> included
> in the binary.  Is this  a known problem?

This is the standard no static linking issue.  Try -Wl,--whole-archive
before -lgcj, this will make static linking pull in the whole library
so that all the classes are there.


Thanks,
Andrew Pinski



More information about the Java mailing list