Managing multiple version of java is painful. Agreed. Compared to java other language ecosystems like are flying at rocket speed. So, There always things that can be learned from other language ecosystems. One such thing is environment management systems.
Jabba is a version manager for JAVA written in GOlang
After you install it, All you have to know is
to show up all java SDKs with versions
jabba install <sdk name from "jabba ls-remote" command>
jabba use <sdk name from "jabba ls-remote" command>
if you do
You would get the java version of the SDK on which you used the jabba use command.