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]

Logging + static linking


Mark Anderson writes:
 > I am trying to create a statically linked executable that makes use
 > of java.util.logging, however, I cannot seem to get it to produce
 > any logging output.

This probably won't work, because there is no reference to the logger
support classes that the linker can see.  The linker removes from the
object file every class that is not directly reachable from the
program.

You can try to figure out exactly what classes are required and emit
static references to them or link against libgcj with --whole-archive.
I don't recommend either of these routes.

Perhaps you can put the libgcj.jar in your runtime classpath and
interpret the support classes.  I don't know if that will work.  But I
haven't been able to make it work with static linkage whatever I
tried.  I think the problem is with the stack trace infrastructure.

Andrew.


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