javar/jdk8-analysis/src/launcher/version_comp.c
/*
 *      Return true if this simple-element (as defined in JSR 56) forms
 *      an acceptable match.
 *
 *      JSR 56 is modified by the Java Web Start <rel> Developer Guide
 *      where it is stated "... Java Web Start will not consider an installed
 *      non-FCS (i.e., milestone) JRE as a match. ... a JRE from Sun
 *      Microsystems, Inc., is by convention a non-FCS (milestone) JRE
 *      if there is a dash (-) in the version string."
 *
 *      An undocumented caveat to the above is that an exact match with a
 *      hyphen is accepted as a development extension.
 *
 *      These modifications are addressed by the specific comparisons
 *      for releases with hyphens.
 */
Return true if this simple-element (as defined in JSR 56) forms
an acceptable match.

JSR 56 is modified by the Java Web Start  Developer Guide
where it is stated "... Java Web Start will not consider an installed
non-FCS  JRE as a match.

An undocumented caveat to the above is that an exact match with a
hyphen is accepted as a development extension.

These modifications are addressed by the specific comparisons
for releases with hyphens.
Return true if this simple - element ( as defined in JSR 56 ) forms an acceptable match . JSR 56 is modified by the Java Web Start Developer Guide where it is stated " ... Java Web Start will not consider an installed non - FCS JRE as a match . An undocumented caveat to the above is that an exact match with a hyphen is accepted as a development extension . These modifications are addressed by the specific comparisons for releases with hyphens .
static int
acceptable_simple_element(const char *release, char *simple_element)
{
    char        *modifier;
    modifier = simple_element + JLI_StrLen(simple_element) - 1;
    if (*modifier == '*') {
        *modifier = '\0';
        if (JLI_StrChr(release, '-'))
            return ((JLI_StrCmp(release, simple_element) == 0)?1:0);
        return ((JLI_PrefixVersionId(release, simple_element) == 0)?1:0);
    } else if (*modifier == '+') {
        *modifier = '\0';
        if (JLI_StrChr(release, '-'))
            return ((JLI_StrCmp(release, simple_element) == 0)?1:0);
        return ((JLI_ExactVersionId(release, simple_element) >= 0)?1:0);
    } else {
        return ((JLI_ExactVersionId(release, simple_element) == 0)?1:0);
    }
}
static int acceptable_simple_element ( const char * release , char * simple_element ) { char * modifier ; modifier = simple_element + JLI_StrLen ( simple_element ) - 1 ; if ( * modifier == ' ' ) { * modifier = ' \0 ' ; if ( JLI_StrChr ( release , ' ' ) ) return ( ( JLI_StrCmp ( release , simple_element ) == 0 ) ? 1 : 0 ) ; return ( ( JLI_PrefixVersionId ( release , simple_element ) == 0 ) ? 1 : 0 ) ; } else if ( * modifier == ' ' ) { * modifier = ' \0 ' ; if ( JLI_StrChr ( release , ' ' ) ) return ( ( JLI_StrCmp ( release , simple_element ) == 0 ) ? 1 : 0 ) ; return ( ( JLI_ExactVersionId ( release , simple_element ) >= 0 ) ? 1 : 0 ) ; } else { return ( ( JLI_ExactVersionId ( release , simple_element ) == 0 ) ? 1 : 0 ) ; } }
Return true if this simple-element (as defined in JSR 56) forms
      an acceptable match.
Return true if this simple - element ( as defined in JSR 56 ) forms an acceptable match .