Background
I work mostly in Java and Scala on my job, but a lot of our legacy code has not yet been updated to the most recent JDK. Thus, we have to have JDK versions 5, 6, 7, and 8 installed on our development machines. Until recently, I had been using Arch Linux, but I just switched to OpenSuse Tumbleweed. The method I used to install the JDK versions was to download the RPM installer scripts from the Oracle website and install them beginning with 1.5 and working my way up to 1.8 so that the /usr/java/latest
symbolic link would already be pointing to the correct version.
Problem
After reinstalling the aforementioned JDK versions, I attempted to point to these installations in IntelliJ IDEA. But it complained with the error "The selected directory is not a valid home for JDK". I have found a lot of resources online concerning this issue and ones like it, but none of those solutions helped in my case. Furthermore, the symbolic links in /usr/bin
for the sundry Java executables were pointing to a conflagration of /etc/alternatives
directives.