This chapter will walk you through downloading the necessary software for developing Java applications.

Downloading and Installing the JDK

In order to start developing programs in Java we will need to download the Java Development Kit (JDK). The JDK is a collection of software that enables you to develop Java applications on your computer. Without it, your computer would not understand what Java is or how to run Java programs. There are actually many different JDKs to choose from, developed by various companies and organisations. The one we’re going to use is called AdoptOpenJDK, although feel free to use a different one if you prefer.

To download AdoptOpenJDK:

  1. Go to adoptopenjdk.net
  2. Under Choose a Version, choose OpenJDK 11 (LTS)1.
  3. Under Choose a JVM, choose HotSpot.
  4. Click the download button. This will download the latest release of the version you selected.
    1. Make sure you’re downloading a suitable JDK for your operating system (OS). For instance, if your OS is Windows (64-bit) it should say “Download for Windows x64” near the top. If this is incorrect, click the “Other platforms” button and download a suitable JDK for your OS.

To install AdoptOpenJDK:

  1. Run the AdoptOpenJDK installer.
  2. Click Next.
  3. If you accept the terms of the License Agreement, click the checkbox. Then click Next.
  4. On the Custom Setup window:
    1. If the settings Add to PATH, Associate .jar, or Set JAVA_HOME variable have an X by them, click the X and choose “Will be installed on local hard drive”.
    2. Click Next.
  5. Click Install and wait for the installation to complete.
  6. Click Finish.

1LTS stands for Long Term Support. LTS versions are supported for longer and receive security updates and bug fixes but generally don’t receive feature updates. LTS versions are useful to developers who want to stick to a specific version of the JDK for a long period of time, as updating to the newest version every six months can be costly and impractical, especially for large projects.

Downloading and Installing an IDE

Now we need to download an IDE (Integrated Development Environment). An IDE is, essentially, an application for developing applications. Just like how Microsoft PowerPoint is an application for creating presentations and GIMP is an application for image-editing, an IDE is an application for writing, testing, and running programs. In fact, an IDE is what you use to create applications like PowerPoint and GIMP, which in turn are used to create their respective media.

Three popular IDEs for developing Java programs are NetBeans, IntelliJ IDEA, and Eclipse. I’ll be using IntelliJ IDEA throughout this tutorial.

To download IntelliJ IDEA:

  1. Go to www.jetbrains.com/idea/download
  2. Under the Community Edition, click Download.

To install IntelliJ IDEA:

  1. Once the installer has downloaded, run it.
  2. Click Next.
  3. Click Next again.
  4. Under Installation Options there are a few options that you can select to your liking:
    1. 64-bit launcher will put an icon on the desktop to open IntelliJ IDEA.
    2. Add “Open Folder as Project” will add an option to the context menu that pops up when you right-click a folder. This option will open the folder in IntelliJ IDEA if it contains a valid project.
    3. Create Associations means if you open a file with a particular extension, it will automatically open in IntelliJ IDEA.
    4. Update PATH variable means it will add the launcher’s directory to the PATH Environment Variable.
    5. If you’re not sure what to choose, personally I would check all the boxes.
  5. When ready, click Next.
  6. Click Install and wait for the installation to complete.
  7. Click Finish.

Leave a Reply

Your email address will not be published. Required fields are marked *