Tomcat is a special case: via tomcat-native it can use openssl; in my case Java5+Tomcat6 merrily works with tomcat-native-1.3.1/openssl-3.4.0
https://tomcat.apache.org/download-native.cgi