How to set JAVA_HOME in Bamboo installation folder

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Normally JAVA_HOME environment variable is set at the operating system level or user profile level like the article Setting JAVA_HOME.

This article covers that if you prefer to manage the JDK that is used at the Installation folder level, and not within the user/OS environment you can follow the below steps. 

Environment

All supported versions of Bamboo.

Solution

Add a line in the $BAMBOO_INSTALL/bin/setenv.sh/bat to set the JAVA_HOME environment variable and make sure that it is a supported version on the Supported platforms page.

The example below shows how the JAVA_HOME is set.
setenv.sh

setenv.sh
#!/bin/sh
#
# One way to set the Bamboo HOME path is here via this variable.  Simply uncomment it and set a valid path like /bamboo/home.  You can of course set it outside in the command terminal.  That will also work.
#
#BAMBOO_HOME=""

JAVA_HOME=/usr/lib/jvm/temurin-11-jdk-arm64


Please check the additional references below.

Bamboo installation guide

Supported platforms




Last modified on Nov 28, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.