From what I understand, the actual file structure in c:\windows\Microsoft.Net\Framework has folders with versions of .Net installed. On my computer, I have folders up to v3.5, or
c:\windows\Microsoft.Net\Framework\v3.5.
There are lots of issues with this, including security issues though.
The second, and probably better answer would be to check the windows registry.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP
The Version key will have the value you are looking for.
Edit: stackoverflow question regarding reading the registry with java.
http://stackoverflow.com/questions/62289/readwrite-to-windows-registry-using-java
This library http://www.trustice.com/java/jnireg/ will allow you to read the registry.