From d88091b0a730b12e2063a826e4be883216dafde6 Mon Sep 17 00:00:00 2001 From: Guillaume Martres <smarter@ubuntu.com> Date: Wed, 18 Sep 2019 17:19:11 +0200 Subject: [PATCH] Update JDK installation instructions --- week1/00-tools-setup.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/week1/00-tools-setup.md b/week1/00-tools-setup.md index d2643af..c2bf292 100644 --- a/week1/00-tools-setup.md +++ b/week1/00-tools-setup.md @@ -23,11 +23,26 @@ sudo dnf install java-1.8.0-openjdk-devel ### On macOS -macOS either comes with a pre-installed JDK, or installs it automatically. To verify your JDK installation, open the Terminal and type `java -version`. If the JDK is not yet installed, the system will ask you if you would like to download and install it. Make sure you install Java 1.8. +First, install Homebrew: +```shell +/usr/bin/ruby -e "$(curl -kfsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +``` + +Install OpenJDK 8: +```shell +brew tap AdoptOpenJDK/openjdk +brew cask install adoptopenjdk8 +``` + +Set it as the default Java version: +```shell +echo "export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) >> ~/.bash_profile +echo "export PATH="$JAVA_HOME/bin:$PATH" >> ~/.bash_profile +``` ### On Windows -[Download and run the JDK 8 installer for Windows from Oracle's website.](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) +[Download and run the OpenJDK 8 installer.](https://adoptopenjdk.net) ## Step 3: Verify your JDK installation @@ -49,8 +64,6 @@ See [https://www.scala-sbt.org/1.x/docs/Installing-sbt-on-Linux.html](https://ww ### On macOS -First, install Homebrew from [https://brew.sh](https://brew.sh) Then run: - ```terminal brew install sbt@1 ``` -- GitLab