Runtime.Version
mark.reinhold at oracle.com
mark.reinhold at oracle.com
Tue Jul 18 21:16:18 UTC 2017
2017/7/18 13:12:23 -0700, rfscholte at apache.org:
> For several plugins we need to compare the Java version. That's not always
> the Runtime used by Maven, but another (often older) installed JRE/JDK,
> e.g. by calling javadoc -J-version or java -version and parsing its output.
> If would help us if we could implement our own parsing strategy and get a
> Runtime.Version for comparison. All currently exposed segments won't help
> here and as said I wonder where these are actually used apart from the
> compareTo-method.
> Otherwise we're reinventing/reimplementing the comparison algorithm of
> JEP223 too.
Sorry, but the `Runtime.Version` class was never intended to capture all
historical JDK version-numbering schemes, just the new scheme introduced
in Java SE 9. If you want something more general then you'll have to
write it yourself.
- Mark
More information about the jpms-spec-observers
mailing list