Update Server JDK and JRE after Oracle Database Installation and creation
Oracle Database ships with its own JDK, it does not use the JDK you install on Linux.

So you can upgrade that without any impact.