Cannot change 'sun.jnu.encoding' from Cp1252 to UTF-8
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
Summary
On Windows machines running Java 18, the sun.jnu.encoding
cannot be updated from Cp1252 to UTF-8.
Environment
Windows 10
Java OpenJDK Temurin-11.0.13
Diagnosis
Configure below two properties in Jira startup options and restart Jira:
1
2
-Dfile.encoding=utf8
-Dsun.jnu.encoding=utf8
In Jira Administration > System > System info
System Encoding is set as UTF-8
sun.jnu.encoding is set as Cp1252 which is unexpected
Cause
This issue is caused by known OpenJDK Java defect:
The bug JDK-8275145 has been fixed in Java version 18. However, OpenJDK Java 18 is not compatible with current Jira versions.
Solution
No workaround on this issue now. We have an open suggestion ticket to request Jira compatible with Java 18.
Was this helpful?