# Java JDK 8

## Introduction

This guide will show you how to install **Java JDK 8** on **Windows**, **Mac OS X** and **Linux**.

{% hint style="success" %}
The choice of Java as a language for development was not occasional, but due to the fact that of the **21 million existing developers** in the world, **9 million are Java developers**, according to the Global Developers Population and Demographic Study in 2016. \
**It is one of the largest development communities in the world!**
{% endhint %}

## Guide

{% tabs %}
{% tab title="Windows" %}
**Step 1:** go to [**link**](https://www.oracle.com/java/technologies/javase/javase8u211-later-archive-downloads.html). Accept license agreement and download latest Java 8 JDK (32 or 64 bit) for Windows:

![](https://1246655713-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L_mPP3a_E_A7NbRMq7Q%2F-M26G9uaLcB0CJC2pWhe%2F-M26LMj3uOlUYyn8xsvJ%2Fimage.png?alt=media\&token=f95bf2f3-e0e6-4a9c-8773-11ae09fb30b5)

{% hint style="info" %}
Requires an Oracle account
{% endhint %}

**Step 2:** if download is complete, run .exe for install. Click *Next*:

![](https://1246655713-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L_mPP3a_E_A7NbRMq7Q%2F-LyUQjqRsmpghbIxZ7BJ%2F-LyUSqdcBxHfx-lQeiPf%2Fstep_2.png?alt=media\&token=d9fa2b6a-7fbf-423e-8991-f0b06fd98ad8)

**Step 3:** select the path of JDK installation and click *Next* :

![](https://1246655713-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L_mPP3a_E_A7NbRMq7Q%2F-LyUQjqRsmpghbIxZ7BJ%2F-LyUT9o_rkvYc85_1n4y%2Fstep_3.png?alt=media\&token=8ad19e4e-08dc-4071-a0ac-59a0780328e4)

**Step 4:** select the path of JRE installation and click *Next* :

![](https://1246655713-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L_mPP3a_E_A7NbRMq7Q%2F-LyUQjqRsmpghbIxZ7BJ%2F-LyUT_1xwh0w144c83Uz%2Fstep_4.png?alt=media\&token=c6e93317-801a-49d5-a569-1039fb82ab5f)

**Step 5:** once installation is complete click *Close* :

![](https://1246655713-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L_mPP3a_E_A7NbRMq7Q%2F-LyUQjqRsmpghbIxZ7BJ%2F-LyUTxImOIkGo0_WI1SP%2Fstep_5.png?alt=media\&token=f9620934-92c4-440c-af7f-e935788ab87e)

**Step 6:** open CMD (command line prompt) as administrator;

**Step 7:** set *JAVA\_HOME* environment variable:

`C:\> setx JAVA_HOME "C:\Program Files\Java\jdk1.8.0_231"`

**Step 8:** add  *JAVA\_HOME* and subfolders to *PATH* :

`C:\> setx PATH "%JAVA_HOME%;%JAVA_HOME%\bin;%JAVA_HOME%\lib;%PATH%;"`

**Step 9:** reopen  your CMD (command line prompt) and try:

`C:\> echo %JAVA_HOME%`

if response is `C:\Program Files\Java\jdk1.8.0_231` you installed everything correctly.
{% endtab %}

{% tab title="macOS X" %}
For the matter of simplicity you've chosen Java JDK 8 implementation of [AdoptOpenJDK](https://adoptopenjdk.net/).

Install brew, it is pretty easy and straightforward. Paste the following command on your terminal.

```
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```

Brew is a package manager that easily allows you to install packages on macOS X, it is similar to the debian package manager apt-get. Paste the command bellow on you terminal and you will have the Java JDK 8 on your machine.

```
brew cask install adoptopenjdk/openjdk/adoptopenjdk8
```

{% endtab %}

{% tab title="Linux (debian based)" %}
**Step 1:** open terminal (CTRL+ALT+T);

**Step 2:** updates APT:

`$ sudo apt update`&#x20;

**Step 3:** install Java 8:

`$ sudo apt-get install openjdk-8-jdk`

**(Optional):** if you already have another Java version:

`$ sudo update-alternatives --config java`

and select the correct version.
{% endtab %}
{% endtabs %}

{% hint style="success" %}
You have successfully installed Java JDK 8 on your machine.
{% endhint %}

## See more

After that it's possible to [start](https://totalcross.gitbook.io/playbook/learn-totalcross/getting-started/) into many IDEs! Start with Visual Studio Code or another non Maven friendly, following the [Maven installation guide](https://totalcross.gitbook.io/playbook/learn-totalcross/basic-requirements/maven/).
