Change the version of Java in your project, so add in your pom-file
In your IDE change the version of your modules to JDK 11 and change the language level to Java 11. (In IntelliJ : short-cut F4)
The ultimate test is to use somewhere in your code the ‘var’-keyword: Recompile, run all the tests and start the application. If everythings works : the migration is a succes
As final step it is often needed to update your pipeline or CI/CD:
The security-configuration file got moved to the config-folder of your JVM
The command-line arguments are now easier, like -XX:+UseContainerSupport is now default (5)
Exceptions like Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException. Just include:
Embedded Postgres database gave some issues and this fixes it. Alternatively you can use Test Containers.
SSL-issues: they were due to more validation by Java 11. This is normally all fixed now.
Exceptions where they complain about the byte code version mismatch. Just remember that byte code of Java 8 is version 52 and the byte code of Java 11 is version 55.
You probably didn’t rebuild all modules or somewhere there is a wrong Java version declared.
The exception is normally very verbose and easy to understand (7)