For installing the Java Development Kit, go back to the browser, open a new tab, and just search for jdk (short for Java Development Kit). This will bring you to the Oracle site, from where you can download Java:
On the Oracle website, click on JDK DOWNLOAD. Now, click on Accept License Agreement and then you can select the download option for your operating system:
For me, that's going to be Windows 64-bit, and a wait for 198 MB of goodness to download:
Once the download is finished, locate the installer and start it running. Note that we can't just accept the default settings in the installer on Windows here. So, this is a Windows-specific workaround, but as of the writing of this book, the current version of Spark is 2.1.1 and it turns out there's an issue with Spark 2.1.1 with Java on Windows. The issue is that if you've installed Java to a path that has a space in it, it doesn't work, so we need to make sure that Java is installed to a path that does not have a space in it. This means that you can't skip this step even if you have Java installed already, so let me show you how to do that. On the installer, click on Next, and you will see, as in the following screen, that it wants to install by default to the C:Program FilesJavajdk path, whatever the version is:
The space in the Program Files path is going to cause trouble, so let's click on the Change... button and install to c:jdk, a nice simple path, easy to remember, and with no spaces in it:
Now, it also wants to install the Java Runtime environment, so just to be safe, I'm also going to install that to a path with no spaces.
At the second step of the JDK installation, we should have this showing on our screen:
I will change that destination folder as well, and we will make a new folder called C:jre for that:
Alright, successfully installed. Woohoo!
Now, you'll need to remember the path that we installed the JDK into, which in our case was C:jdk. We still have a few more steps to go here. Next, we need to install Spark itself.