Skip to content

Install Java using Jenv

On both Linux and MacOS, follow the official jenv install procedure.

Then, download the required Java JDK and add them to jenv:


On linux, copy/paste the hole script bellow (and modify $JAVA_INSTALL_DIR if needed):

git clone ~/.jenv
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(jenv init -)"' >> ~/.bashrc
source ~/.bashrc
export JAVA_INSTALL_DIR=~/opt/java

# Here replace with appropriate version for your platform (see


tar -zxvf OpenJDK8U-jdk_x64_linux_hotspot_8u252b09.tar.gz
rm OpenJDK8U-jdk_x64_linux_hotspot_8u252b09.tar.gz
jenv add jdk8u252-b09
source ~/.bashrc
jenv enable-plugin export
jenv global  # use jenv versions to see the choices


minimum openjdk

In some versions of openjdk (eg 8u222), incompatible SSL behaviour makes unit tests of bootstrap-lib fail:

[INFO] Punch Platform Core Library 6.1.0 ......... FAILURE [ 5.224 s] [ERROR] Failures: [ERROR] UtilSslTest.loadTrustStore:63 cert 1 not null ==> expected: not [INFO] [ERROR] Tests run: 68, Failures: 1, Errors: 0, Skipped: 0 [INFO] Running org.thales.punch.libraries.elasticsearch.utils.api.UtilSslTest 11:48:03 [ERROR] message="Unable to load keystore material. Password may be wrong or key is corrupted" 11:48:03 [ERROR] message="Unsupported keystore type" type=txt path=/tmp/no_keystore.txt [ERROR] Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.047 s <<< FAILURE! - in org.thales.punch.libraries.elasticsearch.utils.api.UtilSslTest [ERROR] loadTrustStore Time elapsed: 0.019 s <<< FAILURE! org.opentest4j.AssertionFailedError: cert 1 not null ==> expected: not > at org.thales.punch.libraries.elasticsearch.utils.api.UtilSslTest.loadTrustStore(

The solution is to replace (using apt update, or jenv) your old openjdk with a newer one...