--- netty-tcnative-netty-tcnative-parent-2.0.59.Final/openssl-classes/src/main/java/io/netty/internal/tcnative/Library.java 2021-02-11 18:31:40.893244271 +0100 +++ netty-tcnative-netty-tcnative-parent-2.0.59.Final/openssl-classes/src/main/java/io/netty/internal/tcnative/Library.java 2021-02-11 18:42:25.537083503 +0100 @@ -39,7 +39,9 @@ /* Default library names */ private static final String [] NAMES = { "netty_tcnative", - "libnetty_tcnative" + "libnetty_tcnative", + "tcnative-1", + "libtcnative-1" }; private static final String PROVIDED = "provided"; @@ -55,22 +57,20 @@ String [] paths = path.split(File.pathSeparator); StringBuilder err = new StringBuilder(); for (int i = 0; i < NAMES.length; i++) { + String name = "@PATH@/" + NAMES[i] + ".so"; try { - loadLibrary(NAMES[i]); + System.load(name); loaded = true; } catch (ThreadDeath t) { throw t; } catch (VirtualMachineError t) { throw t; } catch (Throwable t) { - String name = System.mapLibraryName(NAMES[i]); - for (int j = 0; j < paths.length; j++) { - File fd = new File(paths[j] , name); + File fd = new java.io.File(name); if (fd.exists()) { // File exists but failed to load throw new RuntimeException(t); } - } if (i > 0) { err.append(", "); }