Getting all sub-keys of a registry key
I know how to read the value of a registry key, but how do I iterate through all it's children?
I've seen code floating around that will return the current installed JRE, but it does not return the build version. The only way to do that (so far as I can see) is to iterate all versions listed in the registry, finding the entry with the highest build number and returning that.
For example, instead of returning 1.5.0, I'm expecting the code to return 1.5.0_02