[PATCH FOR REVIEW]: Unset JAVA_HOME and JDK_HOME prior to building OpenJDK

Andrew John Hughes gnu_andrew at member.fsf.org
Tue Aug 25 07:08:44 PDT 2009


2009/8/25 Lillian Angel <langel at redhat.com>:
> Andrew John Hughes wrote:
>>
>> This simple patch for IcedTea6 unsets JAVA_HOME and JDK_HOME before
>> starting an OpenJDK build.  If JAVA_HOME is set, an OpenJDK build will
>> fail.
>>
>> Ok to commit?
>>
>> ChangeLog:
>>
>> 2009-08-25  Andrew John Hughes  <ahughes at redhat.com>
>>
>>        * Makefile.am:
>>        Unset JAVA_HOME and JDK_HOME before building.
>>
>>
>
> I am not thrilled with the idea of unsetting env vars on a system. I think
> maybe it would be better for configure to fail and give an error message if
> either of these are set.
>
>
> Thoughts?
> Lillian
>

It already does fail, though later after the user has gone through the
pain of extracting and patching OpenJDK. Yes, we could do an earlier
check in configure, but why do so when we can unset it for the
duration of make?  If configure fails, then the user has to do unset
JAVA_HOME anyway to make it build, which has the disadvantage that
they then lose their JAVA_HOME setting, something which doesn't happen
with this fix.  The OpenJDK build instructions specify that JAVA_HOME
should be unset:
http://hg.openjdk.java.net/jdk7/build/raw-file/tip/README-builds.html#linux
-- 
Andrew :-)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net

PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8



More information about the distro-pkg-dev mailing list