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

Bug#283557: java-common: JAVA POLICY: define defaultJAVA_HOME=/usr/lib/java as alternative.



Hi,

the program which needed JAVA_HOME was 'ant'; it might have had to do with
the fact that I had the JDK and JRE packages both installed with some
alternatives (java) pointing to the JRE and some (javac) to the JDK.
But, anyway, I had to define JAVA_HOME to make it work.

And I thought that what I proposed is aligned with the policy rule you are
listing (and which I considered in my thoughts). If /usr/lib/java is
defined as the default alternative for the JAVA_HOME directory, I can, in
my program, script, Makefile, rule-file, set JAVA_HOME to the default
/usr/lib/java value, giving the user a chance to overrule this through his
own definition of JAVA_HOME.
Am I clear? :-) I am not saying JAVA_HOME should be set to /usr/lib/java,
I am saying that /usr/lib/java could be created as alternative to be used
as default value for JAVA_HOME within programs.

But if you think that my configuration is broken, and ant shouldn't need
JAVA_HOME, then I'll try to fix it myself. Actually I think I already
fixed it by removing the JRE and re-linking the different alternatives to
the JDK (but I don't notice because JAVA_HOME is defined in my Makefile).

Eric

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> tags 283557 + wontfix
> thanks
>
> Mon, 29 Nov 2004 22:02:06 +0100,
> Eric Lavarde <debian.bugs.nospam@zorglub.s.bawue.de> wrote:
>
>> Hi,
>
> Hi,
>
>> my suggestion would be to define the directory /usr/lib/java as default
>> java-home, so that someone can define a default value for the variable
>> JAVA_HOME, which some utilities seem to require.
>> I think of something like the following in a shell script:
>> ${JAVA_HOME:=/usr/lib/java}
>
> ,----[ /usr/share/doc/debian-policy/policy.txt ]
> | 9.9. Environment variables
> | --------------------------
> |
> |      A program must not depend on environment variables to get
> |      reasonable defaults.  (That's because these environment variables
> |      would have to be set in a system-wide configuration file like
> |      `/etc/profile', which is not supported by all shells.)
> |      [...]
> `----
>
> Which program does need JAVA_HOME? and why? IMHO this is not a clean
> design.
>
> Cheers,
>
> PS: If someone else wanna take care of this bug, just remove the
>     'wontfix' tag.
>


-- 
Eric de France, d'Allemagne et de Navarre



Reply to: