Tech and Media Labs
This site uses cookies to improve the user experience.

Installing the Java SDK

Jakob Jenkov
Last update: 2015-02-13

In order to develop Java applications or Java APIs you need the Java Software Developer Kit (Java SDK) installed. You should install the Java SDK you want to use. At the time of writing this, I am using the Java 8 SDK. You can find the Java 8 SDK here:

Java 8 SDK

Once you have installed the Java SDK, test that you have it working by opening a command prompt (textual interface to your computer, ala Unix Shell, Windows CMD etc.) and type:

java -version

If the Java SDK was probably installed you should see an output similar to this:

C:\Users\jjenkov>java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

Installing Multiple Java SDKs

If you are maintaining older Java projects you may need to have multiple Java SDKs installed. This is possible. However, typically it will be the latest version which is executed when you type java in the command prompt. In order to run an older Java SDK, write the full path to where the java (or javac or whatever command you need) is located in the older Java SDK.

If you are using an IDE, they can typically handle this for you. Typically you set a Java SDK for the project, point to where that Java SDK is installed on your machine, and the IDE takes care of using it for compiling and running your Java code.

Installing a Java IDE

If you plan to be working more seriously with Java, I would recommend that you install a Java IDE (Integrated Development Environment). An IDE contains both a code editor with syntax highlighting, code completion, code generation, often with version control system integration and more. An IDE also makes it easy to compile and run your Java code, all from within the IDE.

Here are the three most popular Java IDEs:

Personally I use IntelliJ IDEA, but I have used all three IDEs over the years, and all of them are pretty good nowadays. IntelliJ IDEA has a free community edition which is enough for you to get started with Java. Eclipse and Netbeans are completely free.

Jakob Jenkov

Copyright  Jenkov Aps
Close TOC