#!/bin/bash

echo "Installing OpenJDK"

if [ $test_only -eq 0 ]; then
    apt-get install -y openjdk-7-jdk

    JRE_PATH=$(update-alternatives --list java)
    JRE_HOME=${JRE_PATH%/bin/java}
    JDK_PATH=$(update-alternatives --list javac)
    JDK_HOME=${JDK_PATH%/bin/javac}

    echo "OpenJDK has been installed"
else
    exit 0
fi
