The only way to do this on Windows is via a registry read. Jeff Storey's post has the reg key you need. As for doing this from Java, my original response was going to be: you can't without using JNI.
But then I did some googling, and found this library
The approach is a bit novel b/c it involves accessing parts of Sun's implementation of the Preferences API that aren't generally available. This is, certainly, not going to be compatible for different JVMs, and could break as Sun's JRE evolves - but... well - I'll bet it would be useful for at least a couple of years, maybe longer. And it's a lot easier than writing the JNI yourself...