Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 9248 invoked from network); 19 Nov 2007 17:30:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Nov 2007 17:30:09 -0000 Received: (qmail 42819 invoked by uid 500); 19 Nov 2007 17:29:56 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 42784 invoked by uid 500); 19 Nov 2007 17:29:56 -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 42775 invoked by uid 99); 19 Nov 2007 17:29:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2007 09:29:56 -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 (nike.apache.org: local policy) Received: from [192.18.43.133] (HELO sca-es-mail-2.sun.com) (192.18.43.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2007 17:29:58 +0000 Received: from fe-sfbay-09.sun.com ([192.18.43.129]) by sca-es-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id lAJHTabA015148 for ; Mon, 19 Nov 2007 09:29:36 -0800 (PST) Received: from conversion-daemon.fe-sfbay-09.sun.com by fe-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0JRR00101IYF3400@fe-sfbay-09.sun.com> (original mail from Richard.Hillegas@Sun.COM) for derby-dev@db.apache.org; Mon, 19 Nov 2007 09:29:36 -0800 (PST) Received: from richard-hillegas-computer.local ([129.150.17.37]) by fe-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0JRR008L9KL9GH50@fe-sfbay-09.sun.com> for derby-dev@db.apache.org; Mon, 19 Nov 2007 09:29:33 -0800 (PST) Date: Mon, 19 Nov 2007 09:29:35 -0800 From: Rick Hillegas Subject: Re: Automatic setting of compiler classpath properties at build time In-reply-to: Sender: Richard.Hillegas@Sun.COM To: derby-dev@db.apache.org Message-id: <4741C7FF.7020907@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <474199FA.9030800@sun.com> User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) X-Virus-Checked: Checked by ClamAV on apache.org 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. 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. > When I manually installed the JDKs in neighbour directories under > /usr/local/java and put /usr/local/java/jdk1.5.0/bin first in the PATH, > it worked just fine, though. > > >> In order to take advantage of this automatic property setting today, >> you need to remove some existing properties from your ant.properties >> (j14lib, j15lib, java14compile.classpath, java15compile.classpath) >> and, instead, set the following in ant.properties: >> > > I don't think our build system knows about j15lib or > java15compile.classpath. Should we add a note about them in > BUILDING.txt, and also define them in > tools/ant/properties/compilepath.properties? If I understand correctly, > we can't actually build Java 5 code unless we either set those > properties or use the automatic property setting, so we'll have to wait > until those properties are mandatory before we can start using Java 5 > code in engine code? > > Right. The properties j15lib and java15compile.classpath aren't used right now. But we're gearing up to being able to use those properties (soon) in build targets which don't want to accidentally pull in Java 6 libraries when compiling sources that merely depend on Java 5. Thanks, -Rick