Between JDK 8 and JDK 11 a lot has changed, mostly around modularization of the JDK in JDK 9. A few examples below cover method changes between our primary JDK versions:
- Getting a new instance via reflection. The
getDeclaredConstructor()
is expected, ex.Class.forName(serviceName).getDeclaredConstructor().newInstance()
- Deprecation of the
finalize()
method - Forced boxing is frowned upon and flagged in the IDE
new Integer(13)
ornew Boolean(true)
should not be used. The base type is expected instead.
Native libs built with JDK 8 continue to work with JDK 11. Conversion of native dependencies to JDK 11 for build eclusivity will take a bit more time, but should not preclude the server proper from being upgraded.
Our TeamCity agents have 8 and 11 on them. To target a particular JDK you would have to change the JAVA_HOME
param for
the build: http://54.174.142.30:8111/admin/editBuildParams.html?id=buildType:Red5ProServer_Red5ProFeatureStaging
ex. switching to JDK 11: /usr/lib/jvm/java-11-openjdk-amd64
Tomcat should be set to version 8.5.61 and the Red5 Tomcat plugin to version 2.2.8.
Additional JDK paths on Ubuntu as follows:
- OpenJDK 8:
/usr/lib/jvm/java-8-openjdk-amd64
- Amazon Corretto 8:
/usr/lib/jvm/java-1.8.0-amazon-corretto
- OpenJDK 11:
/usr/lib/jvm/java-11-openjdk-amd64
- Amazon Corretto 11:
/usr/lib/jvm/java-11-amazon-corretto
TeamCity has
/usr/lib/jvm/java-8-oracle
set in parameters