Added code to look into Registry to detect the Java installation dir.