-
Download the
.dmg
file for "macOS x64" here. Due to licensing, you will need to login to start the download. Creating an account is free. -
Install the JDK on your system by double clicking the
.dmg
file, then running the installer. -
Once installed, launch Terminal and execute the following command on your Mac to execute a script that installs
mvn
, if needed, and a program calledjenv
that will let you switch between different JDK installations if you have more than one:$ curl -s -L http://csweb.cs.uga.edu/~mec/cs1302macOS-2020-04-13.sh | bash
There may be a lot of output. Pay careful attention to the end, which should be similar (but maybe not identical) to the following:
The latest installed Oracle JDK is oracle64-1.8.0.241. You can use the following command in a NEW terminal window to activate it: jenv local oracle64-1.8.0.241
-
Launch a new Terminal window, execute the
jenv
command provided in your output, then inspect the output of the following command to see if everything worked:$ mvn -v | sed -n 3p
It should be similar to the following:
Java version: 1.8.0_241, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre
-
If you need to change which JDK version you're using, then inspect the versions using
jenv versions
, then activate the one you want usingjenv local jdk_name
.
Last active
February 7, 2022 08:51
-
-
Save mepcotterell/e00a37ccf54d9b8ae1a390bb1e5d4336 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment