[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Environment variables for Debian (e.g. JAVA_HOME, etc)



Peter Samuelson wrote:
[Matthew Palmer]

Or Java could be sensible and have a standard place for putting
libraries that you didn't have to specify via an environment
variable. Then you wouldn't even need a wrapper...


I have wondered for *years* - first, why Java doesn't do this, and
second, why Java users don't seem to see a problem with Java not doing
this.  By and large they seem to just accept calmly that you have to
set arcane variables just to run any and all programs.  This is like
having to have LD_LIBRARY_PATH in your environment in order to run ls.

Because Java needs to go through the same growing pains C/Unix did :)

There was a time, when C didn't have dynamic libraries. People were distributing big binary blobs back then. When you look at many Java applications, that's what we do these days[1]. And we love it! :)

cheers,
dalibor topic

[1] Big binary blobs made of collections of small binary blobs.

Actually, the blob format (Jar) supports a few neat things in theory, but they are either unused in practice or abused. My favourite are Classpath: entries in jar manifests. Neat idea, but leads to directory structure dependant binary blobs in practice. Move a jar to another directory and the fragile mechanism falls apart, because the relative paths are not wrong, and absolute paths to jars are completely absurd, anyway, as noone installs them in the same place. Yay, WORA. :)

Oh, and you can see the same phenomenon in the C world, with non-relocatable binaries, by the way. But since C on Unix-y platforms has a somewhat sanitized way of finding dynamic libraries, it works at least for looking up the libraries, somewhat, LD_LIBRARY_PATH kludges aside.



Reply to: