Confused about jar/lib usage
Tom Tromey
tromey@redhat.com
Mon Feb 2 20:46:00 GMT 2004
>>>>> "Ray" == Ray Auge <rayauge@doublebite.com> writes:
Ray> I'm a little confused about the referencing of jars. Do I (or do I NOT)
Ray> need to have the natively compiled version of the jar accessible to the
Ray> program after compilation?
With the current gcj, the linking model is basically C's.
So, if your program references a class, you must have a gcj-compiled
version of that class available at link time. If you compile a .jar
to a shared library, as is the most common approach, then you must
have the resulting .so available at runtime. You can link
statically, but that is tricky with gcj; the list archives are full
of various gotchas and workarounds.
Tom
More information about the Java
mailing list