This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Confused about jar/lib usage
- From: Tom Tromey <tromey at redhat dot com>
- To: Ray Auge <rayauge at doublebite dot com>
- Cc: gcj-java <java at gcc dot gnu dot org>
- Date: 02 Feb 2004 13:36:54 -0700
- Subject: Re: Confused about jar/lib usage
- References: <1075611301.5139.7.camel@ibook>
- Reply-to: tromey at redhat dot com
>>>>> "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