OpenJDK 64-Bit Server VM is an unsupported JVM

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

Note that this KB was created for the Data Center version of the product. Data Center KBs 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

Symptoms

The Bitbucket Server UI shows the following error when trying to access http://BITBUCKET_HOST:PORT:

The following problem occurred which prevents Atlassian Bitbucket Server from starting correctly OpenJDK 64-Bit Server VM is an unsupported JVM

In the atlassian-bitbucket.log the following can be seen:

2012-11-09 08:27:36,813 ERROR [main] c.a.s.i.j.JdkApplicationEventCheck OpenJDK 64-Bit Server VM is an unsupported JVM. <a href="http://confluence.atlassian.com/x/pQqTE">Supported platforms</a>. 2012-11-09 08:27:36,822 ERROR [main] c.a.j.s.w.c.JohnsonContextLoaderListener Bypassing Spring ApplicationContext initialisation; a previous fatal error was found: OpenJDK 64-Bit Server VM is an unsupported JVM. <a href="http://confluence.atlassian.com/x/pQqTE">Supported platforms</a>. 2012-11-09 08:27:37,077 ERROR [main] c.a.j.s.w.s.JohnsonDispatcherServlet Bypassing SpringMVC dispatcher [spring-mvc] initialisation; Spring initialisation was bypassed

Cause

Previously Bitbucket Server did not support OpenJDK as mentioned in the Supported platforms document. As of Bitbucket Server 2.5 OpenJDK is officially supported. If you have any previous version, there is a check in place that prevents Bitbucket Server from running with it.

Resolution

In order to run Bitbucket Server with OpenJDK:

  1. Stop Bitbucket Server.

  2. Edit the following line in <Bitbucket Server Installation Directory>/bin/setenv.sh for Linux/Unix or <Bitbucket Server Installation Directory>/bin/setenv.bat for Windows:

    JVM_SUPPORT_RECOMMENDED_ARGS="-Dbitbucket.allow.openjdk=true"

    setenv and environment variable changes in Bitbucket Server 5.0+

    Starting with Bitbucket Server 5.0, setenv.sh and setenv.bat have been removed. The options that were set in this file can now be set via environment variables. Where to set the environment variable depends on which Operating System you're running on.

    Linux

    When using the atlbitbucket service on Linux, the environment variables are ignored. You must set the parameters in _start-webapp.sh (or start-bitbucket.sh). These values will be read when the service starts.

    As an example, to set JVM_SUPPORT_RECOMMENDED_ARGS, you would add this line to the file:

    JVM_SUPPORT_RECOMMENDED_ARGS=-XX:+HeapDumpOnOutOfMemoryError

    Windows

    Set the parameter as an environment variable for the user running Bitbucket Server. For example, if you want to set JVM_SUPPORT_RECOMMENDED_ARGS, create it as an environment variable and assign the appropriate value to it. When Bitbucket Server starts using the startup scripts or service, it will pick up and apply this value.

  3. Start Bitbucket Server.

Or to run Bitbucket Server with Oracle JDK:

  1. Stop Bitbucket Server.

  2. Download a Supported JVM from the Oracle Web Site.

  3. Change the value of the JAVA_HOME variable to the Oracle JDK path.

  4. Start Bitbucket Server.

Updated on May 22, 2025

Still need help?

The Atlassian Community is here for you.