Launcher: Defensive fixes
Added some checks to the launcher to handle missing HOME, JAVA_HOME, or argument to -{C,e,I,S}
Fixes #8747
Added some code to parse $JAVA_HOME/release instead of source it, which lets us use $JAVA_RELEASE_VERSION for the AppCDS archive which may be more correct and will handle Graal better
I think we need to detect whether we found a JAVA_HOME a different way that works without the release file; perhaps $JAVA_HOME/bin/java?
The problem with this is we find JAVA_HOME by trimming /bin/java from the path to java, if we add that back on it will always match
@mrnoname1000 Please re-review this... it's been sitting for a few months and I want to make sure it's still valid.
Weirdly enough the last commit to the launcher in master was less than an hour before the first one in this branch, so no conflicts and everything still looks valid
@mrnoname1000 Thanks, merged!