code: def find_jvm_dll_file(java_home_dir=None, fail=False):
      
  
      logger.debug("Searching for JVM shared library file")
  
      if java_home_dir:
          jvm_dll_path = _find_jvm_dll_file(java_home_dir)
          if jvm_dll_path:
              return jvm_dll_path
  
      jvm_dll_path = os.environ.get('JPY_JVM_DLL', None)
      if jvm_dll_path:
          return jvm_dll_path
  
      for name in JRE_HOME_VARS:
          java_home_dir = os.environ.get(name, None)
          if java_home_dir:
              jvm_dll_path = _find_jvm_dll_file(java_home_dir)
              if jvm_dll_path:
                  return jvm_dll_path
  
      jvm_dll_path = ctypes.util.find_library(JVM_LIB_NAME)
      if jvm_dll_path:
          logger.debug("No JVM shared library file found in all search paths. Using fallback %s" % repr(jvm_dll_path))
      elif fail:
          raise RuntimeError("can't find any JVM shared library")
  
      return jvm_dll_path
docs: Try to detect the JVM's shared library file.
      :param java_home_dir: The Java JRE or JDK installation directory to be used for searching.
      :return: pathname if found, else None