Ignore cruft at the end of the version string.

This commit is contained in:
Michael Bayne
2007-02-22 19:21:52 +00:00
parent cd622bee95
commit 4341710e18
@@ -538,7 +538,7 @@ public class Application
// parse the version out of the java.version system property
String verstr = System.getProperty("java.version");
Matcher m = Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)(_\\d+)?").matcher(verstr);
Matcher m = Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)(_\\d+)?.*").matcher(verstr);
if (!m.matches()) {
// if we can't parse the java version we're in weird land and should probably just try
// our luck with what we've got rather than try to download a new jvm