code: def _get_from_registry(self):
          
          # Winreg is an optional package in cygwin
          winreg = self._get_winreg()
          if not winreg:
              return None
          for location in reg_keys:
              try:
                  jreKey = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, location)
                  cv = winreg.QueryValueEx(jreKey, "CurrentVersion")
                  versionKey = winreg.OpenKey(jreKey, cv[0])
                  winreg.CloseKey(jreKey)
  
                  cv = winreg.QueryValueEx(versionKey, "RuntimeLib")
                  winreg.CloseKey(versionKey)
  
                  return cv[0]
              except WindowsError:
                  pass
docs: Retrieves the path to the default Java installation stored in the
          Windows registry
  
          :return: The path found in the registry, or None