Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 63795 invoked from network); 19 Nov 2007 19:45:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Nov 2007 19:45:47 -0000 Received: (qmail 45428 invoked by uid 500); 19 Nov 2007 19:45:35 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 45220 invoked by uid 500); 19 Nov 2007 19:45:34 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 45211 invoked by uid 99); 19 Nov 2007 19:45:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2007 11:45:34 -0800 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [192.18.6.21] (HELO gmp-eb-mail-1.sun.com) (192.18.6.21) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2007 19:45:23 +0000 Received: from fe-emea-09.sun.com (gmp-eb-lb-2-fe1.eu.sun.com [192.18.6.10]) by gmp-eb-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id lAJJjFQZ016466 for ; Mon, 19 Nov 2007 19:45:15 GMT Received: from conversion-daemon.fe-emea-09.sun.com by fe-emea-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0JRR00801QRBKI00@fe-emea-09.sun.com> (original mail from Knut.Hatlen@Sun.COM) for derby-dev@db.apache.org; Mon, 19 Nov 2007 19:45:15 +0000 (GMT) Received: from localhost ([193.71.105.147]) by fe-emea-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0JRR00GZLQVCOKE0@fe-emea-09.sun.com> for derby-dev@db.apache.org; Mon, 19 Nov 2007 19:45:12 +0000 (GMT) Date: Mon, 19 Nov 2007 20:45:08 +0100 From: Knut Anders Hatlen Subject: Re: Automatic setting of compiler classpath properties at build time In-reply-to: <4741C7FF.7020907@sun.com> Sender: Knut.Hatlen@Sun.COM To: derby-dev@db.apache.org Message-id: Organization: Sun Microsystems MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT References: <474199FA.9030800@sun.com> <4741C7FF.7020907@sun.com> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (usg-unix-v) X-Virus-Checked: Checked by ClamAV on apache.org Rick Hillegas writes: > Knut Anders Hatlen wrote: >> Rick Hillegas writes: >> >> >>> I have checked in some build logic which automatically sets the >>> compiler classpath properties. This is part of the work on DERBY-3117 >>> and the goal, ultimately, is to have a Derby build script which works >>> out of the box without any customizing of ant.properties. >>> >> >> Hi Rick, >> >> I tested the patch on Solaris 10 and on Solaris Express Community >> Edition snv_77, with JDK 1.4 and JDK 5 installed on their default >> locations and JAVA_HOME unset, but both attempts failed because the JDK >> 1.4 installation is not found. >> >> I think the problem lies in that the Solaris packages install the >> different JDK versions to these two locations: >> >> /usr/jdk/j2sdk1.4.2_06 >> /usr/jdk/jdk1.5.0_13 >> >> However, j2sdk1.4.2_06 is a symlink to ../j2se and jdk1.5.0_13 is a >> symlink to instances/jdk1.5.0, so when the symlinks are followed, they >> don't seem to be installed in neighbour directories. Unless you >> immediately see how to solve this, I'll take a look at it tomorrow. >> > Thanks, Knut. I think that the instructions in BUILDING.txt say you > you have to set JAVA_HOME. Removing that extra bit of setup might be a > useful next step, but isn't covered by this change. OK, I should have read BUILDING.txt first, but I still see the problem when I set JAVA_HOME to one of: /usr/jdk/latest /usr/jdk/jdk1.5.0_13 /usr/jdk/instances/jdk1.5.0 In all three cases, /usr/jdk/instances/jdk1.5.0/jre is reported as java.home by "ant -diagnostics" (which is the same as it reports if I don't set JAVA_HOME). So it seems like the JDK resolves the symlinks for us before we even see it. > However, you bring up an interesting case: What if the user sets > JAVA_HOME not to the symlink but, instead, to the directory that it > points at. On my Macbook the symlinks end up pointing at JDKs that > are, nevertheless, parked next to each other. That doesn't seem to be > the case in your Solaris installation. I don't have a smart heuristic > for what to do if the JDKs don't live next door to each other. If you > would like to noodle about this problem, that would be great. I'll do that. I think we could get around the problem by having an extra check if the property setter didn't find one of the JDKs, and if ${os.name}=="SunOS", we then look for JDK 1.4 under /usr/jdk and for JDK 5 (or later) under /usr/jdk/instances. -- Knut Anders