In order to follow this course, you will need to install a couple of libraries & tools. Read this section to find out which and how.

Even if you already have the specific tool installed on your machine, make sure to at least consult every checkpoint section, to avoid any bad surprises along the way.

Installing Java

To get started developing in Java, you first need to install. If already have version 12 installed, you can skip to the next section.

What Java do I need? JRE? JDK?

When talking about Java, this course usually refers to a Java Development Kit (short: JDK). The JDK basically comes with the compiler that lets you compile Java source code, as well as a Java Runtime Environment (short: JRE), that lets you run Java programs.

If you only installed a JRE on your system, you could only run, but not compile Java programs. With a JDK installed, you can do both.

What version do I need? OpenJDK or OracleJDK?

Short answer: Any Java version from (1.)8 to 12, though 12 is recommended. Does not matter if OpenJDK, OracleJDK or Zulu JDK.

Java is backwards compatible

Coming from other languages, there is often confusion about versions and version compatibilities: Do programs written in Java 8 (released 2014) still work with Java 12 (released 2019) ?

Java is heavily backwards compatible, as opposed to languages like Python, where there are huge breakages between, say, version number 2 and 3. That is why Java 8 applications will work without any problems with a Java 12 runtime, but obviously not the other way around.

You will be able to complete this course with any Java version installed, starting from Java 8. It does not matter if you are using Java 8, 9, 10, 11, 12 or even later. In the videos, however, Java 12 will be used and any specific Java 12 language features will be explicitly mentioned and an alternative given for older Java version.

The JDK provider does not matter

OpenJDK is a free and open-source reference implementation of Java. There are also other implementations, which offer additional features or different licensing/support options, but for this course none of this matters.

So simply install the latest OpenJDK version of your liking.

How do I install a JDK/latest Java version?

There’s a variety of ways to install OpenJDK on your machine. If you already have a Java version (>8) installed you can now skip to the next section, otherwise watch one of the following videos:

Windows:

Linux:

Note: The Ubuntu version of this video is not available for this preview of W1D1, but is available for all confirmed course participants.

macOS:

Note: The macOS version of this video is not available for this preview of W1D1, but is available for all confirmed course participants.

Checkpoint: Installing Java

Open up a command line window and enter

java --version

You will need to see similar output:

openjdk version "12.0.2" 2019-07-16
OpenJDK Runtime Environment (build 12.0.2+10)
OpenJDK 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)

Make sure that installed Java version is at least 1.8, preferrably 9-12.

What prerequisites do I need to follow this course?

As this course is not suited for complete Java or programming beginners, you’ll need at least the following skills:

  • A good understanding of intermediate Java (or a similar OO-programming language. Does not matter if C#, PHP, Ruby, Javascript)

  • Know how HTTP requests work

  • Know what HTML is and how to construct basic web pages with it

  • How to use a database and execute simple database queries

  • Know what a version control system like Git is and what it does

Maven

You need to have, at least, a basic understanding of what a build tool (Maven) is and what it does. Also, you need a recent version of Maven (>= 3.5) installed on your machine. A quick refresher, especially for developers coming from other programming language ecosystems.

  • Maven lets you easily include 3rd party project dependencies into your project, such as Spring itself (dependency management). Think Javascript’s npm, Ruby’s bundle or PHP’s composer.

  • It allows you to conveniently compile your source code and package it up into an executable format (.jar or .war-file) that every machine which has Java installed, understands. The alternative is calling the Java compiler by hand, or through complex shell scripts on the command line, which simply does not work for anything but toy projects.

  • It can even do more advanced things, like deploying applications, but you’ll learn these concepts throughout this course, whenever applicable

If you don’t have Maven installed on your machine, or want to make sure to have it installed the right way, watch one of the following videos:

Windows:

Linux:

Note: The Ubuntu version of this video is not available for this preview of W1D1, but is available for all confirmed course participants.

MacOSX:

Note: The macOS version of this video is not available for this preview of W1D1, but is available for all confirmed course participants.

Checkpoint: Installing Maven

Open up a command line window and enter

mvn -version

You will need to see similar output:

Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-04T20:00:29+01:00)
Maven home: C:\dev\apache-maven-3.6.1\bin\..
Java version: 12.0.2, vendor: Oracle Corporation, runtime: C:\dev\jdk-12.0.2

Make sure that installed Maven version is at least 3.5(.x), preferrably 3.6(.x).

Git

In theory, Git, or any other version-control system is not really needed for this project. However, there is one huge benefit to using Git throughout this course: It makes it very easy to compare the different solutions you are going to build for Part 1, 2 and 3.

diag c9d86e0017482ca67afbea1affa266d4

If you are completely new to Git, you might want to have a look at the ‘Additional Resources’ section to follow a beginner tutorial.

If you already have Git installed and now the very basics such as ‘git commit’ and ‘git checkout’ you can skip to the next section. Otherwise, have a quick look at the following videos to get Git installed on your machine:

Windows:

Linux:

Note: The Ubuntu version of this video is not available for this preview of W1D1, but is available for all confirmed course participants.

MacOSX:

Note: The macOS version of this video is not available for this preview of W1D1, but is available for all confirmed course participants.

Checkpoint: Installing Git

Open up a command line window and enter

git --version

You will need to see similar output:

git version 2.22.0.windows.1

Make sure that installed Maven version is at least 2(.x).

IDE: IntelliJ Community

You will want to use an IDE when programming Java, to make certain workflows much easier and efficient. You basically have four choices:

  • IntelliJ Idea (free and paid versions available)

  • Eclipse (free)

  • Netbeans (free)

  • Visual Code (free)

This course is based on using the free IntelliJ Community Edition. All other IDEs work as well, but you will not be able to use the same time-saving keyboard shortcuts/workflows that come with IntelliJ.

If you are a more advanced user, choose the IDE you are most comfortable with. Otherwise, simply download and install the free IntelliJ Community edition.

To get instructions on how to install IntelliJ, watch one of the following videos:

Windows:

Linux:

Note: The Ubuntu version of this video is not available for this preview of W1D1, but is available for all confirmed course participants.

MacOSX:

Note: The macOS version of this video is not available for this preview of W1D1, but is available for all confirmed course participants.

Checkpoint: Installing IntelliJ Idea

Make sure you have IntelliJ Toolbox and IDEA installed and that you can open up IntelliJ (and see Import Project/Open Project links) like shown in the video.

Finish Line

You now have everything installed that you need to successfully complete this course. Let’s start building the URL shortener!