Installing Java

iGene and Karaf run on a Java virtual machine and it’s important to ensure it’s installed and setup correctly. This comes down to two things:

  • A valid version of Java
  • The JAVA_HOME environment variable is set correctly

This guide walks through setting up both.

Download Amazon Corretto

Due to changes with Oracle and Java licensing, Genial now recommend iGene is run on Amazon’s production-ready distribution of the Open Java Development Kit (OpenJDK), Amazon Corretto.

Download the latest Amazon Corretto 8 JRE from the link below. Generally, customers will be using the Windows x64 version:

Download from: https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/downloads-list.html

JVM Version

Unzip and move to ‘C:\Program Files’

Once downloaded, unzip and place into C:\Program Files\.

Unzip and move

We used 7Zip instead of the default Zip program on Windows as it’s generally quicker.

Setup environmental variables

Next, the environmental variable needs to be setup so the command-line Java tools will work correctly and for Karaf to know where Java is installed.

Firstly, copy the path for Corretto from the previous step, (Open c:\Program files, find the correct path and copy it). We’ll use this path shortly.

Copy Path

Now open the advanced system preferences and click on environmental variables, and in the system variables, edit the existing “Path” variable. On the end of the path add ;, and then the location of Corretto copied earlier adding \bin. In the example below, this is ;C:\Program Files\jre1.8.0_202\bin (This may be slightly different depending on the version downloaded).

Set Path Var

Now we need to create a new system environmental variable called JAVA_HOME with the path copied earlier, in our case this will be C:\Program Files\jre1.8.0_202\. Below are two examples:

Windows 7, Server 2012

Set Java Home

Windows 10, Server 2019

Set Java Home Windows 10

Check Everything Is Set Up Correctly

Next confirm that everything is setup correctly. Open up a command-prompt and type in the following include the : "%JAVA_HOME%\bin\java" -version.

If all is correct, it should say something like this, notice it says Corretto-8. If yours doesn’t say this then please recheck each of the instructions in this guide.

Check Java version

Check Java