Browse Source

Use OpenJDK instead of the Oracle JDK

The oracle-java8-installer package is currently failing with a 404 error.
We found workarounds to fix the installer but they seem more complicated
than using OpenJDK instead.

We don't think that anything in TFB actually depends on something that's
in the Oracle JDK and not in OpenJDK such that test implementations would
start to fail.  If there are test implementations like that, we should
probably fix them so that they aren't like that.

We're asserting that there will be no difference in performance.

Looking ahead to the future, Oracle provides OpenJDK 9 in .tar.gz form
(at http://jdk.java.net/9/), which we would prefer to use instead of apt.
We're going to upgrade Java versions eventually, so we'd probably switch
to OpenJDK then for the .tar.gz convenience even if we didn't switch now.
Michael Hixson 7 years ago
parent
commit
99f8073065
1 changed files with 3 additions and 4 deletions
  1. 3 4
      toolset/setup/linux/languages/java.sh

+ 3 - 4
toolset/setup/linux/languages/java.sh

@@ -3,13 +3,12 @@
 fw_installed java && return 0
 fw_installed java && return 0
 
 
 # TODO: Someday get away from apt-get
 # TODO: Someday get away from apt-get
-sudo add-apt-repository -y ppa:webupd8team/java
+sudo add-apt-repository -y ppa:openjdk-r/ppa
 sudo apt-get update
 sudo apt-get update
-echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
-sudo apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y oracle-java8-installer
+sudo apt-get install openjdk-8-jdk
 
 
 # Setup environment variables
 # Setup environment variables
-JAVA_HOME=/usr/lib/jvm/java-8-oracle
+JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
 echo "export JAVA_HOME=${JAVA_HOME}" > $IROOT/java.installed
 echo "export JAVA_HOME=${JAVA_HOME}" > $IROOT/java.installed
 echo -e "export PATH=\$JAVA_HOME/bin:\$PATH" >> $IROOT/java.installed
 echo -e "export PATH=\$JAVA_HOME/bin:\$PATH" >> $IROOT/java.installed