Configuring Java 17 Compatibility
Temporary Measures for Java 17 Compatibility
Applicable up to version 1.1.17.
This configuration is not required for version 1.2 and later.
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:
1. Download the Required Libraries
Download the following 5 JAR files from Maven Central:
2. Place the Libraries in the Specified Directory
Copy the downloaded JAR files to the following directory:
/opt/atlassian/confluence/lib
3. Edit the setenv.sh
File
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:
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"
4. Restart Confluence
After completing the above steps, restart the Confluence service to apply the changes.
Notes
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.