The previous answer looks like the sort of answer I'd expect ChatGPT to generate and doesn't actually answer the question, which is, for a Java application, is there any way to mitigate this issue.
Short of using a different JRE/JDK, the answer would appear to be no.