[Mondrian] Updated buildOnJdk script

Patrick Leckey patl at seewind.com
Fri Mar 9 13:28:59 EST 2012

Sorry if this is a double, I didn't see my first send go through.


Still don't know why it works on Ubuntu but not CentOS with symlinks.  However I have reverted to your buildOnJdk.sh file and added 1 change that allows it to work on Ubuntu and CentOS/RHEL 5/6.

When you set the defaultJavaHome in chooseJavaHome(), I changed it to resolve the symlink to it's actual path:
readlink -f /usr/lib/jvm/${jdkVersion}

This allows different JDKs to be used via symlink as you mentioned, but will pass the actual path the symlink points to as the JAVA_HOME, which fixes the issues on CentOS/RHEL, allowing us non-Ubuntu folk to compile with the defaults, not having to pass in a JAVA_HOME_1X env.

On both CentOS and Ubuntu, the "readlink" util is installed as part of the "coreutils" package, which is installed even with the most minimal installs on both distros, thus not introducing a new package dependency.

It's simply changing line 70, the (*) condition of the case $(uname) block to:
defaultJavaHome=`readlink -f /usr/lib/jvm/${jdkVersion}`;;

More information about the Mondrian mailing list