Go to Oracle's Java JDK download page. On that page, under the heading labeled "Java SE Development Kit 10.0.2", click the button to Accept the license agreement, then click the macOS link (it should be the middle one in the list) to download the appropriate installer for your operating system. You don't need to download the "Demos and Samples Downloads" link. Once you have downloaded the Java JDK installer .dmg file, double-click it to run it, which will install JDK on your computer. You can choose all default options during the installation.
(Yes, you do need to do this. Even though this course is in C++, our libraries also require Java to function properly.)
Though we will use Qt Creator for our programs in CS 106B/X, Mac OS X requires you to install their Xcode system to get a C++ compiler on your machine. To install Xcode, visit the Mac App Store and search for "XCode". You can get to the Mac App Store on your Mac by clicking the Apple Logo in the upper-left corner of your screen and selecting "App Store". The app store will open, and you should download Xcode. Xcode is a large app, so the download and installation may take some time.
Once your Xcode has installed, you have to actually launch the Xcode application one time in order to to install certain essential components. Open the newly downloaded Xcode application and accept the license agreement.
You do not need to check any of the other options within the "Qt 5.11.2" category. You can leave un-checked every other checkbox except for "MacOS", as shown in the screenshot below. Accidentally checking too many boxes can increase the installation space needed from ~20gb to around 2gb, which you probably don't want.
You can now open up Qt Creator using Spotlight (the magnifying glass at the top right of your screen) and typing in "Qt Creator".
Let's make sure that all the parts are working together properly by building and running a sample Qt Creator project that uses the Stanford C++ libraries. The Stanford C++ libraries also interact with Java, so if this project runs properly for you, then you will be sure that your Qt Creator and Java JDK are both set up properly. Here's what to do:
If you encounter any problems during your attempt to compile and run the sample project, check out our Qt Creator troubleshooting page. Otherwise, congratulations; you're done!