Skip to content

Configuring Java 17 Compatibility

Temporary Measures for Java 17 Compatibility

Section titled “Temporary Measures for Java 17 Compatibility”

Starting from Java 17, the Nashorn Script Engine previously used in this app has been removed. As a temporary workaround, please follow the steps below:

Download the following 5 JAR files from Maven Central:

2. Place the Libraries in the Specified Directory

Section titled “2. Place the Libraries in the Specified Directory”

Copy the downloaded JAR files to the following directory:

/opt/atlassian/confluence/lib

To ensure the libraries are loaded at startup, edit the following file:

/opt/atlassian/confluence/bin/setenv.sh

Update the CATALINA_OPTS configuration by adding the JAR files to the classpath. Use the example below as a reference:

Terminal window
CATALINA_OPTS="${CATALINA_OPTS} ${JVM_SUPPORT_RECOMMENDED_ARGS} -DConfluenceHomeLogAppender.disabled=${CONFLUENCE_LOG_STDOUT} -cp /opt/atlassian/confluence/lib/nashorn-core-15.3.jar:/opt/atlassian/confluence/lib/asm-7.3.1.jar:/opt/atlassian/confluence/lib/asm-commons-7.3.1.jar:/opt/atlassian/confluence/lib/asm-tree-7.3.1.jar:/opt/atlassian/confluence/lib/asm-util-7.3.1.jar"

After completing the above steps, restart the Confluence service to apply the changes.

  • These steps are a temporary measure. Please consider updating to the official solution when available.
  • It is highly recommended to back up the original setenv.sh file before making any modifications.