Sets RTs for JDKs as optional dependencies of the codegen phase.