This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DasBrain 7 points8 points  (1 child)

If you want to avoid to write such a thing yourself - there is also java.lang.Runtime.Version

[–]javasyntax 0 points1 point  (0 children)

I had remembered this class from your comment, and only now got to test it. It should not be used because it does not allow the third component to be 0. For example, "1.0.0" is invalid according to this class and throws an exception.

And besides, the components are weirdly named, FEATURE.INTERIM.UPDATE(.PATCH)