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:
1. Download the Required Libraries
Section titled “1. Download the Required Libraries”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/lib3. Edit the setenv.sh File
Section titled “3. Edit the setenv.sh File”To ensure the libraries are loaded at startup, edit the following file:
/opt/atlassian/confluence/bin/setenv.shUpdate 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
Section titled “4. Restart Confluence”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.shfile before making any modifications.