This is an old revision of the document!
MacOS
First, go to the Apple App Store and install Xcode
(Apple's compiler and development tools).
Then, in a terminal:
xcode-select --install
clang -o program program.c
clang++ -o program program.cc
g++ -std=c++11 -o program program.cpp g++-7 -std=c++11 -o program program.cpp
See https://github.com/AdoptOpenJDK/homebrew-openjdk where you can go and grab prebuilt openjdk binaries for macOS!
It’s just a case of using:
brew tap AdoptOpenJDK/openjdk brew install <version>
Where version is:
adoptopenjdk-openjdk8
adoptopenjdk-openjdk9
adoptopenjdk-openjdk10