Skip to content

Home

Development

IDEs

API Explorer

Releases

Release notes

Martini Runtime

Martini Desktop

Martini Online

Feature requests

Bug reports

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 Runtime1, you need the Java SE Development Kit 8 (or higher) installed on your machine.

If you've never installed the JDK before or would like to do a clean install of the JDK, then follow the steps under the respective section of your machine's operating system. There are various ways of installing the JDK. You can either use a package manager, or opt to install it manually.

Package manager support

Not all package managers support the JDK. You can refer to your package manager's listing to see if the Java SE Development Kit 8 is listed.

For this installation, we will be using the OpenJDK (specifically the AdoptOpenJDK) flavor of the JDK, but you are free to use the other ones (e.g., Oracle JDK).

What is OpenJDK?

OpenJDK is a free and open-source implementation of the Java SE Platform Edition.2

What is AdoptOpenJDK?

AdoptOpenJDK is a free, community-led initiative that provides pre-built binaries of the OpenJDK.

What are these 'flavors of the JDK'?

These 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.

To install the JDK using Homebrew, run:

1
2
brew tap adoptopenjdk/openjdk
brew cask install adoptopenjdk8

To install the JDK using MacPorts, run:

1
sudo port install openjdk8

To install the JDK using SDKMAN!, run:

1
sdk install java 1.8.0-adpt
  1. Go to the AdoptOpenJDK downloads page.
  2. Choose Install JDK.
  3. Launch the installation wizard by double-clicking OpenJDK8U-jdk_x64_mac_hotspot_xxxxxxxx.pkg.
  4. Follow the installation procedures in the wizard.
  1. Import the official AdoptOpenJDK GPG key3.
    1
    wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
    
  2. Import the AdoptOpenJDK DEB repository using add-apt-repository.
    1
    sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/
    
  3. 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
    
  1. 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 versions3.
    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
    
  2. 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
    
  1. 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 versions3.
    1
    zypper ar -f http://adoptopenjdk.jfrog.io/adoptopenjdk/rpm/opensuse/15.0/$(uname -m) adoptopenjdk
    
  2. Install OpenJDK.
    1
    zypper install adoptopenjdk-8-hotspot
    

To install the JDK using SDKMAN!, please run:

1
sdk install java 1.8.0-adpt

To install the JDK using SDKMAN!, please run:

1
sdk install java 1.8.0-adpt

To install the JDK using Chocolatey, please run:

1
choco install adoptopenjdk8

  1. Go to the download page (32-bit or 64-bit) of AdoptOpenJDK.
  2. Choose Install JDK.
  3. Launch the installation wizard by double-clicking on the OpenJDK8U-jdk_x64_windows_hotspot_xxxxxxxx.msi (or OpenJDK8U-jdk_x86-32_windows_hotspot_xxxxxxxx.msi if you are using the 32-bit version).
  4. Follow the installation procedures in the wizard.

After installation, you can run the following command in order to check whether the JDK has been successfully installed in your machine:

1
java -version

This will print the current version of Java installed in your machine.

1
2
3
4
>java -version
openjdk version "1.8.0_XXX"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_XXX-XXX)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build XX.XXX-XXX, mixed mode)

  1. Including the embedded Martini Runtime of Martini Desktop. 

  2. Wikipedia contributors. (2019, August 14). OpenJDK. In Wikipedia, The Free Encyclopedia. Retrieved September 6, 2019, from https://en.wikipedia.org/wiki/OpenJDK 

  3. 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