Skip to main content

Installing Java

All Flowable products consist of a backend (server-side) and frontend (running in the browser) set of technologies. As such, an installation of Java is always needed on the server where the backend is running.

Originally, Java was created, maintained and released by Sun, which later was acquired by Oracle. In July 2018, Oracle released a subscription-based pricing model for Java SE (Standard Edition) and announced that starting in January 2019, Java SE commercial users must buy a license to receive updates. For servers, the 'JDK' (Java Development Kit) distribution is used. The Oracle JDK LTS (Long Term Support), is released every three years.

There are many alternatives (open-source and propietary) for the JDK. All these JDKs are implemented against a common TCK (Technology Compatibility Kit). An alternative JDK option for example is AdoptOpenJDK which is open source licensed and supports versions for longer, particularly the LTS-marked versions which are currently Java 8, 11, 17 and 21.

Note that recent versions of Flowable (3.15+) require Java 17 at minimum. see the Flowable System Requirements and Supported Software documentation for more information.

There are many others such as Azul, Amazon Coretto, the Red Hat build of OpenJDK, the Microsoft build of OpenJDK, SAPMachine, and others.

You can install your single preferred Java distribution, or if you wish or need to work with multiple JDKs then there are two alternatives for installing and managing versions: SDKMAN! and Homebrew.

SDKMAN!

SDKMAN! runs on any UNIX based platforms: Mac OSX, Linux, Cygwin, Solaris and FreeBSD and is used to install and manage Software Development Kits (SDKs) like Java.

The first step is to install SDKMAN!.

On Unix platforms simply open a new terminal and enter:

curl -s "https://get.sdkman.io" | bash

Also, then follow the instructions on-screen to complete the installation. Next, open a new terminal window or enter:

source "$HOME/.sdkman/bin/sdkman-init.sh"
note

To install SDKMAN! in Microsoft Windows, see the SDKMAN! Installation page for the details and options.

With the Next to see a list of available JDKs enter:

sdk list java

This shows something similar to:

================================================================================
Available Java Versions for macOS ARM 64bit
================================================================================
Vendor | Use | Version | Dist | Status | Identifier
--------------------------------------------------------------------------------
Corretto | | 21.0.1 | amzn | | 21.0.1-amzn
| | 17.0.9 | amzn | | 17.0.9-amzn
| | 11.0.21 | amzn | | 11.0.21-amzn
| | 8.0.392 | amzn | | 8.0.392-amzn
Gluon | | 22.1.0.1.r17 | gln | | 22.1.0.1.r17-gln
| | 22.1.0.1.r11 | gln | | 22.1.0.1.r11-gln
GraalVM CE | | 21.0.1 | graalce | | 21.0.1-graalce
| | 17.0.9 | graalce | | 17.0.9-graalce
GraalVM Oracle| | 21 | graal | | 21-graal
| | 21.0.1 | graal | | 21.0.1-graal
| | 17.0.9 | graal | | 17.0.9-graal
Java.net | | 23.ea.1 | open | | 23.ea.1-open
| | 22.ea.27 | open | | 22.ea.27-open
| | 22.ea.26 | open | | 22.ea.26-open
| | 21.ea.35 | open | | 21.ea.35-open
JetBrains | | 17.0.9 | jbr | | 17.0.9-jbr
| | 11.0.14.1 | jbr | | 11.0.14.1-jbr
Liberica | | 21.0.1.fx | librca | | 21.0.1.fx-librca
| | 21.0.1 | librca | | 21.0.1-librca
| | 17.0.9.fx | librca | | 17.0.9.fx-librca
| | 17.0.9 | librca | | 17.0.9-librca
| | 11.0.21.fx | librca | | 11.0.21.fx-librca
| | 11.0.21 | librca | | 11.0.21-librca
| | 8.0.392.fx | librca | | 8.0.392.fx-librca
| | 8.0.392 | librca | | 8.0.392-librca
Liberica NIK | | 23.1.1.r21 | nik | | 23.1.1.r21-nik
| | 22.3.4.r17 | nik | | 22.3.4.r17-nik
| | 22.3.4.r11 | nik | | 22.3.4.r11-nik
Microsoft | | 21.0.1 | ms | | 21.0.1-ms
| | 17.0.9 | ms | | 17.0.9-ms
| | 11.0.21 | ms | | 11.0.21-ms
Oracle | | 21.0.1 | oracle | | 21.0.1-oracle
| | 17.0.9 | oracle | | 17.0.9-oracle
SapMachine | | 21.0.1 | sapmchn | | 21.0.1-sapmchn
| | 17.0.9 | sapmchn | | 17.0.9-sapmchn
| | 11.0.21 | sapmchn | | 11.0.21-sapmchn
Semeru | | 17.0.9 | sem | | 17.0.9-sem
| | 11.0.21 | sem | | 11.0.21-sem
Temurin | | 21.0.1 | tem | | 21.0.1-tem

To install for example Oracle JDK 21: sdk install 21.0.1-oracle or to install OpenJDK 21 (Temurin): sdk install 21.0.1-tem.

To switch between versions use either:

sdk use java 21.0.1-oracle
sdk use 21.0.1-tem

And to set a default version use either:

sdk default 21.0.1-tem

Linux

Depending the linux distrou, installation instructions may vary. For example, on Debian the apt get system will need be used, on Red Hat Linux, yum can be used, etc. Please refer to the specific documentation for your linux distribution.

Homebrew for macOS

To install Homebrew option a terminal window and enter:

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

Detailed instructions and options are found on the installation page for Homebrew.

To install Oracle JDK 8 enter the following:

brew tap caskroom/versions
brew cask install java8

And to install JDK 11 enter:

brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk11

The current list of AdoptOpenJDK version is found here.

To verify the installation and versions, enter:

/usr/libexec/java_home -V
Matching Java Virtual Machines (2):
11.0.3, x86_64: "AdoptOpenJDK 11" /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
1.8.0_202, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home

To manage multiple versions of the JDK there is a tool jEnv that aids in setting the current version of Java.

To install jEnv enter:

brew install jenv
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(jenv init -)"' >> ~/.bash_profile

The next step is to make jEnv aware of the versions. First find where the versions are installed using /usr/libexec/java_home -V:

/usr/libexec/java_home -V
Matching Java Virtual Machines (2):
11.0.3, x86_64: "AdoptOpenJDK 11" /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
1.8.0_202, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home

Next add them to jEnv with jenv add:

jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
openjdk64-11.0.3 added
11.0.3 added
11.0 added
macos$ jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home
oracle64-1.8.0.202 added
1.8.0.202 added
1.8 added

The jenv versions command lists the versions jEnv is managing:

jenv versions
* system (set by /Users/dbm/.jenv/version)
1.8
1.8.0.202
11.0
11.0.3
openjdk64-11.0.3
oracle64-1.8.0.202

The jenv global command sets a global version and jenv local sets the JDK version locally, that is, per directory.

jenv global 11.0.3
jenv versions
  system
1.8
1.8.0.202
11.0
* 11.0.3 (set by /Users/dbm/.jenv/version)
openjdk64-11.0.3
oracle64-1.8.0.202