Knut Anders Hatlen wrote:
Rick Hillegas <[EMAIL PROTECTED]> 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