As discussed on Gitter in sdkman/user-issues channel, it would be nice if SDKMAN could provide some special handling for Java candidates in order to address some of the complexity that comes from presence of different JDK flavors, as well as different kinds of current releases (LTS vs non-LTS).
For instance, I have a preference for Zulu JDKs and generally don't need/want JDKs from other vendors. SDKMAN allows to install individual Zulu JDKs and use default command to set the local default, however when using upgrade command SDKMAN will offer to install candidate that is marked as default on the remote - so even though I have the same or even newer release from a different vendor (note that at the time of writing this, Java candidate does not seem to have any candidate marked as default on the remote).
One possible solution would be to have different candidates for each JDK vendor (e.g. java-open, java-zulu, java-adpt-hs, java-adpt-j9, etc.). This would perhaps be more natural as for other candidates (to my knowledge) there is a 1:1 mapping between the candidate and the vendor, whereas for Java it is 1:n due to multiple vendors contributing to Java candidate. This would however add complexity in other places, as it's unclear how JAVA_HOME would behave when there are multiple Java candidates installed.
As discussed on Gitter in sdkman/user-issues channel, it would be nice if SDKMAN could provide some special handling for Java candidates in order to address some of the complexity that comes from presence of different JDK flavors, as well as different kinds of current releases (LTS vs non-LTS).
For instance, I have a preference for Zulu JDKs and generally don't need/want JDKs from other vendors. SDKMAN allows to install individual Zulu JDKs and use
defaultcommand to set the local default, however when usingupgradecommand SDKMAN will offer to install candidate that is marked as default on the remote - so even though I have the same or even newer release from a different vendor (note that at the time of writing this, Java candidate does not seem to have any candidate marked as default on the remote).One possible solution would be to have different candidates for each JDK vendor (e.g.
java-open,java-zulu,java-adpt-hs,java-adpt-j9, etc.). This would perhaps be more natural as for other candidates (to my knowledge) there is a 1:1 mapping between the candidate and the vendor, whereas for Java it is 1:n due to multiple vendors contributing to Java candidate. This would however add complexity in other places, as it's unclear howJAVA_HOMEwould behave when there are multiple Java candidates installed.