A More FHS-Compliant JDK Install

David Herron davidh at 7gen.com
Mon Jan 3 02:28:37 UTC 2011


Setting JAVA_HOME and export PATH=${JAVA_HOME}/bin:${PATH} is an excess step
to installing software implemented in Java that is not normally required for
other software.

On a Linux system, to run a Python program (for example), are you required
to do the equivalent?  Or can you just type "python script.py"?

It's the latter...

Why isn't it the same/similar for Java?

Why do we make our customers perform extraneous steps?  That they might not
understand.  That they might get wrong.  Where they might not read the
README.  Which make it harder to do automated software installs.  ..etc..

BTW Several years ago Sun unilaterally decided that, on Linux, the various
JDK's should be installed in /usr/java.  The design allowed for multiple
JDK's inside /usr/java.  At the time I thought that was an okay idea.  But
after having talked with people in several Linux distro projects, I
understand the value of weaving Java into the system so that it feels as
seamless as e.g. Python does.

+ David Herron

On Sun, Jan 2, 2011 at 6:09 PM, Lussier, Denis <denisl at openscg.com> wrote:

> The differentiation you describe below for /opt and /usr/local also pretty
> well jibes with my understanding.
> I think that a local build of OpenJDK6 would reasonably be copied to
> /usr/local/openjdk6 for usage.  Perhaps I'm a bit old fashioned, but, I like
> setting JAVA_HOME and placing the bin on the PATH.  This lets me easily test
> & deploy different JVM's, on a given machine, according to the needs of the
> application.
> It gets really confusing (at least for me) on a Mac when there are many
> JVM's (both 32 and 64 bit versions) and somehow the system and application
> preferences interact to magically determine the best JVM to use.
> --Luss
>   http://openscg.org
> On Sun, Jan 2, 2011 at 8:08 PM, Shea Levy <shea at shealevy.com> wrote:
>> -------- Original Message --------
>>   Subject: Re: A More FHS-Compliant JDK Install  Date: Sun, 02 Jan 2011
>> 17:06:44 -0800  From: Shea Levy <shea at shealevy.com>  To: "Lussier, Denis"
>> <denisl at openscg.com>
>> Hi Luss,
>> My understanding (based on similar reasoning to the section of
>> http://lists.netisland.net/archives/plug/plug-2006-01/msg00132.html which
>> starts "I recall a standard on this that I once read.") is that /opt is is
>> better suited for binary distributions and /usr(/local) is more appropriate
>> for packages built on the system. Additionally, installing in /usr(/local)
>> means no need to change $PATH, no need to add custom directories for linkers
>> to look for, and probably (eventually) no need for env variables like
>> $JAVA_HOME. I may be completely off-base here, though, I'm far from an
>> expert in file system standards (though if I'm wrong, I have no idea what
>> differentiates /opt and /usr).
>> Cheers,
>> Shea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/build-dev/attachments/20110102/5b8534e5/attachment.html>

More information about the build-dev mailing list