Installing Java SE Development Kit 8
The Java SE Development Kit (JDK) is a development environment for building applications, and components using the Java programming language. In order to run Martini, you need the Java SE Development Kit 8 installed on your machine.
Below are the various implementations of the Java SE Platform Edition. Vendors have their own version of the JDK. Some of these version are free and open source, but some are proprietary.
For this installation, we will be using the OpenJDK (specifically AdoptOpenJDK) build of the JDK, but you are free to use the other builds (e.g., Oracle JDK). OpenJDK is a free and open-source implementation of the Java SE Platform Edition.1 Meanwhile, AdoptOpenJDK is a free, community-led initiative that provides pre-built binaries of the OpenJDK.
Required JDK 8 version
The JDK comes in 32 and 64-bit versions. Martini requires the 64-bit version.
- Go to the AdoptOpenJDK downloads page.
- Ensure Version 8 and HotSpot are selected.
- Click Install JDK.
- Launch the installation wizard by double-clicking the
OpenJDK8U*.pkg
file which has just been downloaded. - Follow the installation procedures in the wizard.
To install the JDK using Homebrew, run:
1 2 |
|
To install the JDK using MacPorts, run:
1 |
|
To install the JDK using SDKMAN!, run:
1 |
|
- Go to the 64-bit download page of AdoptOpenJDK.
- Ensure Version 8 and HotSpot are selected.
- Click Install JDK.
- Launch the installation wizard by double-clicking on the
OpenJDK8U*.msi
file which has just been downloaded. - Follow the installation procedures in the wizard.
To install the JDK using SDKMAN!, run:
1 |
|
To install the JDK using Chocolatey, run:
1 |
|
-
Import the official AdoptOpenJDK GPG key2.
1
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
-
Import the AdoptOpenJDK DEB repository using
add-apt-repository
.1
sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/
-
Install OpenJDK.
1 2 3 4 5
# Update apt (if you haven't already). apt-get update # Install the OpenJDK. apt-get install adoptopenjdk-8-hotspot
-
Add the RPM repo to
/etc/yum.repos.d/adoptopenjdk.repo
. Make sure to change the version if you are not using CentOS 7 (RPM's are also available for Rhel and Fedora). Go to the AdoptOpenJDK RPM page to check all the supported versions2.1 2 3 4 5 6 7 8
cat <<EOF > /etc/yum.repos.d/adoptopenjdk.repo [AdoptOpenJDK] \ name=AdoptOpenJDK \ baseurl=http://adoptopenjdk.jfrog.io/adoptopenjdk/rpm/centos/7/$(uname -m) \ enabled=1 \ gpgcheck=1 \ gpgkey=https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public \ EOF
-
Install the OpenJDK.
1 2 3 4 5
# Update yum (if you haven't already). yum update # Install the OpenJDK. yum install adoptopenjdk-8-hotspot
-
Import the RPM repo. Make sure to change the version if you are not using openSUSE 15.0 (RPM's are also available for SUSE Linux Enterprise Server (SLES) 12 and 15). Go to the AdoptOpenJDK RPM page to check all the supported versions2.
1
zypper ar -f http://adoptopenjdk.jfrog.io/adoptopenjdk/rpm/opensuse/15.0/$(uname -m) adoptopenjdk
-
Install OpenJDK.
1
zypper install adoptopenjdk-8-hotspot
To install the JDK using SDKMAN!, run:
1 |
|
After installation, you can run the following command in order to check whether the JDK has been successfully installed on your machine:
1 |
|
This will print the current version of Java installed on your machine, which should look similar to the following:
1 2 3 4 |
|
-
Wikipedia contributors. (2019, August 14). OpenJDK. In Wikipedia, The Free Encyclopedia. Retrieved September 6, 2019, from https://en.wikipedia.org/wiki/OpenJDK ↩
-
G. Adams. (2019, May 20). AdoptOpenJDK — RPM and DEB files. Retrieved September 9, 2019, from https://medium.com/adoptopenjdk/adoptopenjdk-rpm-and-deb-files-7003ba38144e ↩↩↩