Installing-java

June 16th, 2023


Recommended versions of Java

We recommend installing a full Java JDK, while Mango should work with just a JRE we sometimes depend on tools only
available in the JDK for our scripts and for providing support.

  • Mango versions 5.0.x and higher require JDK 17.

Installing OpenJDK 17 on Debian/Ubuntu operating systems

You can easily install OpenJDK on Debian/Ubuntu by running

sudo apt update
sudo apt install openjdk-17-jdk-headless

Installing OpenJDK 17

OpenJDK is a free and open source version of the Java JDK. AdoptOpenJDK provides pre-built OpenJDK binaries for a
variety of operating systems and architectures.

  1. Visit Azul Zulu OpenJDK.
  2. Navigate to Java 17.
  3. Choose your operating system and architecture.
  4. Download the archive.
  5. Extract the archive to your chosen location on your filesystem (e.g. /opt/openjdk).
  6. Set the JAVA_HOME environment variable to point to your installation directory.
  7. You may also want to add the bin directory to your path by appending $JAVA_HOME/bin to your PATH environment variable.

Setting your JAVA_HOME environment variable

Linux

Edit your /etc/environment file and add a line like JAVA_HOME=/opt/openjdk (Press Ctrl-X to exit, it will prompt to
save).

sudo nano /etc/environment

Or a simple one line command:

sudo sh -c 'echo JAVA_HOME=/opt/openjdk >> /etc/environment'

Windows

  • Open “System Properties”. On Windows 11, you can search for Environment Variables from the Start menu.

  • Click Environment Variables.

    env vars Windows

  • Under System variables, click New.

  • Enter the following:

    • Variable name: JAVA_HOME
    • Variable value: the path to your Java JDK installation (e.g., C:\openJDK)
  • Press OK to save.

💡 Tip: It's recommended to install Java inside the same directory as the Mango installation directory (e.g., C:\openJDK) so that future system-wide Java updates do not affect Mango's operation.

  • Back in the Environment Variables window, locate the Path variable under System variables, then click Edit.

  • Click New and enter:

    %JAVA_HOME%\bin
    
  • Press OK to save the Path update.

  • Open a new Command Prompt window and verify your configuration:

    java -version
    echo %JAVA_HOME%
    

This ensures Mango and other applications can reliably use the correct version of Java.

Copyright © 2025 Radix IoT, LLC.