Is it ok to use javax.lang.model.SourceVersion to determine the JRE version?
If it is, which one is preffered?
int version = SourceVersion.latest().ordinal();
// or
int version = SourceVersion.latestSupported().ordinal();
Bonus points to whomever explains when SourceVersion#latest() and SourceVersion#LatestSupported() can differ.
PS. I am aware of Getting Java version at runtime