This is the mail archive of the java-patches@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]

Re: Patch: java class registration via .jcr section, take 3


>>>>> "Fergus" == Fergus Henderson <fjh@cs.mu.oz.au> writes:

Fergus> The approach of requiring that you link with a particular
Fergus> program really doesn't scale to multiple languages well.  We
Fergus> made that mistake with `ml', but please don't repeat it with
Fergus> `gcj'.

You aren't required to link with gcj.  However, linking with gcj makes
life a lot easier.  That's because Java programs require a lot of
libraries -- some system and some distributed with gcj.  Exactly which
libraries depends on the configuration and the system (and will depend
on the precise version of gcj; things will change over time).

We decided to have gcj handle this for the user automatically.  And,
in the future we hope to add more features similar to this.  For
instance, if compiling a .java file pulls in a given .jar, we would
like to somehow arrange for the link to automatically include the
corresponding .so, if appropriate.

I agree this doesn't scale.  I've encountered that while writing
automake -- for certain language mixes automake has to just punt and
assume the user will specify how the program should be linked.  But at
the same time, making linking harder to do for Java users isn't a good
choice for us.  Exposing lots of internal details to the user isn't
very friendly, and the common case for Java is that someone writes a
Java program -- not a program mixing Java, Mercury, and Fortran.

Perhaps there is a way to make it easier for everyone.  I don't know
what it is.

Tom


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