private static String determineWindowsLibrary(
      final String library,
      final String osName,
      final String osArch
  ) {
    String resourceName;
    String platform;
    String fileExtension = "dll";

    switch (osArch) {
      case ARCH_AMD64:
      case ARCH_X86_64:
        platform = "windows-x64";
        break;

      default:
        throw new UnsupportedOperationException(
            "Platform " + osName + ":" + osArch + " not supported"
        );
    }

    resourceName = "/" + platform + "/" + library + "." + fileExtension;
    return resourceName;
  }
private static String determineWindowsLibrary ( final String library , final String osName , final String osArch ) { String resourceName ; String platform ; String fileExtension = "dll" ; switch ( osArch ) { case ARCH_AMD64 : case ARCH_X86_64 : platform = "windows-x64" ; break ; default : throw new UnsupportedOperationException ( "Platform " + osName + ":" + osArch + " not supported" ) ; } resourceName = "/" + platform + "/" + library + "." + fileExtension ; return resourceName ; }
Determine the right windows library depending on the architecture.

@param library The library name.
@param osName  The operating system name.
@param osArch  The system architecture.
@return The library resource.
@throws UnsupportedOperationException Throw an exception if no native library for this platform
was found.