Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Configure Bitbucket Server to use the new OpenJDK that was installed

Mahesh Gudapakkam February 6, 2019

Based on this discussion on your community site we decided to upgrade from Bitbucket Server 5.14 to 5.16 so we could begin to use OpenJDK.

We have successfully installed OpenJDK 1.8.202. Configured both JAVA_HOME and JRE_HOME to point to this new installation directory for the OpenJDK as well as added an extra environment variable JVM_SUPPORT_RECOMMENDED_ARGS to allow use of OpenJDK (per this article)

Despite a restart and a reboot it appears that our installation is not fully pointing to/using the OpenJDK. Specifically the JRE in use still seems to be what was bundled with our initial Bitbucket Server installation (some background - we were on 4.1.3, upgraded to 5.14.1 and then finally to 5.16 for the OpenJDK support).

Here's why we think its not fully pointing to the OpenJDK

  • In this admin screen (<our_host>/plugins/servlet/troubleshooting/view/) where we can view the System Information I can see the following (which is right)

    Environment Variables

    ...

    JAVA_HOME       C:\Java\jdk8u202-b08

    JVM_SUPPORT_RECOMMENDED_ARGS        -Dbitbucket.allow.openjdk=true

    JRE_HOME         C:\Java\jdk8u202-b08\jre

    ...
  • But in the same admin screen, further up in another section it still refers to the older version.

    Java Runtime Environment

    ...

    sun.boot.class.path c:\atlassian\bitbucket\4.1.3\jre\lib\resources.jar;c:\atlassian\bitbucket\4.1.3\jre\lib\rt.jar;c:\atlassian\bitbucket\4.1.3\jre\lib\sunrsasign.jar;c:\atlassian\bitbucket\4.1.3\jre\lib\jsse.jar;c:\atlassian\bitbucket\4.1.3\jre\lib\jce.jar;c:\atlassian\bitbucket\4.1.3\jre\lib\charsets.jar;c:\atlassian\bitbucket\4.1.3\jre\lib\jfr.jar;c:\atlassian\bitbucket\4.1.3\jre\classes

    java.vm.specification.vendor     Oracle Corporation

    java.runtime.version                   1.8.0_60-b27

 

I am trying to figure out why this is the case and what do we need to do to make sure it is OpenJDK that is being referred to through out the application? Am I missing any step/setting/configuration?

Cheers,

Mahesh Gudapakkam
Web & Application Developer
Massachusetts College of Art and Design

1 answer

0 votes
Baskar Annamalai
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 18, 2019

Hi Mahesh,

You may need to update the JVM configuration for your service. To do so:
# Stop the service. (It should already be stopped)
# Find the "Short Name" of the Windows service in the Windows Services list
# # Right-click on the service you wish to find out the name of, and select 'Properties' from the popup menu.
## The 'Service name' should appear in the 'General' tab. (Use this parameter as a substitute for {{service_name}} on the command below.)
# Open a Command Prompt "with Administrative Rights".
# Find the Tomcat executable (i.e. in Bitbucket Server, it is <Bitbucket Server Installation Path>\bin\tomcat8w.exe).
# Run the following command:
{noformat}
tomcat8w //ES//service_name
{noformat}
# The JVM Windows service configuration window will open.
# Modify the configuration parameter(s) and click Apply.
# Start the service.

Please note that your JAVA_HOME cannot contain spaces in the name. See [Running Bitbucket Server as a service|https://confluence.atlassian.com/bitbucketserver/running-bitbucket-server-as-a-windows-service-776640048.html]

 

Regards.

Mahesh Gudapakkam February 20, 2019

Hi Baskar

Thanks so much for your suggestion and for taking the time to help me out. Once I made the changes I can see that all of the application is now pointing to and using the OpenJDK I had previously installed.

Thanks again!

Cheers
Mahesh

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events