I have some map reduction programs compiled by Oracle JDK 7. And I'm trying to use whirr 0.8.1 to install an EC2 cluster to run them. However, by default, the JDK installed by whirr 0.8.1 looks like Open JDK 6, and I encountered the following error:
Unsupported version of major.minor 51.0
So I tried to specify the version of whirr JDK by installing:
whirr.java.install-function = install_oracle_jdk7
But this will cause the installation process to fail, and it seems futile to try changing the following script:
buzz-0.8.1 \ kernel \ SRC \ main \ resources \ functions \ install_oracle_jdk7.sh
Does anyone know how to install JDK 7 on an EC2 cluster through whirr?
Thanks a lot to Ravi. The following information on your page is the critical part that I skipped:
... I found that you can create a function directory in the whirr installation directory and place all the modified shell scripts there ...
I am trying to put the modified install_oracle_jdk7.sh file in whirr-0.8.1 \ functions and it really works. The following are my modifications to install_oracle_jdk7.sh:
(delete)
url=http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-i586.tar.gz
if [ "x86_64" == "$arch" ]; then
url=http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz
fi
(add)
url=http://download.oracle.com/otn-pub/java/jdk/7u9-b05/jdk-7u9-linux-i586.tar.gz
if [ "x86_64" == "$arch" ]; then
url=http://download.oracle.com/otn-pub/java/jdk/7u9-b05/jdk-7u9-linux-x64.tar.gz
fi
(delete)
curl $url -L --silent --show-error --fail --connect-timeout 60 --max-time 600 --retry 5 -o $tmpdir/`basename $url`
()
wget -c --no-cookies --header "Cookie: gpw_e24 = http% 3A% 2F% 2Fwww.oracle.com% 2F" $url --output-document=$tmpdir/`basename $url` >
source share