loadLibrary() — netty Function Reference
Architecture documentation for the loadLibrary() function in NativeLibraryLoader.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD bafe3f15_b0bf_647a_3a35_cd885f9d3174["loadLibrary()"] e940cc67_3be6_5ff3_e560_4d68972dc13b["NativeLibraryLoader"] bafe3f15_b0bf_647a_3a35_cd885f9d3174 -->|defined in| e940cc67_3be6_5ff3_e560_4d68972dc13b d92afe83_049b_d0b5_f35c_dd5834c38908["load()"] d92afe83_049b_d0b5_f35c_dd5834c38908 -->|calls| bafe3f15_b0bf_647a_3a35_cd885f9d3174 ad07e32d_733a_fab6_069d_362602f3f820["tryToLoadClass()"] bafe3f15_b0bf_647a_3a35_cd885f9d3174 -->|calls| ad07e32d_733a_fab6_069d_362602f3f820 4596d050_35b6_8fd1_9844_425af82366ca["loadLibraryByHelper()"] bafe3f15_b0bf_647a_3a35_cd885f9d3174 -->|calls| 4596d050_35b6_8fd1_9844_425af82366ca style bafe3f15_b0bf_647a_3a35_cd885f9d3174 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/main/java/io/netty/util/internal/NativeLibraryLoader.java lines 381–409
private static void loadLibrary(final ClassLoader loader, final String name, final boolean absolute) {
Throwable suppressed = null;
try {
try {
// Make sure the helper belongs to the target ClassLoader.
final Class<?> newHelper = tryToLoadClass(loader, NativeLibraryUtil.class);
loadLibraryByHelper(newHelper, name, absolute);
logger.debug("Successfully loaded the library {}", name);
return;
} catch (UnsatisfiedLinkError e) { // Should by pass the UnsatisfiedLinkError here!
suppressed = e;
} catch (Exception e) {
suppressed = e;
}
NativeLibraryUtil.loadLibrary(name, absolute); // Fallback to local helper class.
logger.debug("Successfully loaded the library {}", name);
} catch (NoSuchMethodError nsme) {
if (suppressed != null) {
ThrowableUtil.addSuppressed(nsme, suppressed);
}
throw new LinkageError(
"Possible multiple incompatible native libraries on the classpath for '" + name + "'?", nsme);
} catch (UnsatisfiedLinkError ule) {
if (suppressed != null) {
ThrowableUtil.addSuppressed(ule, suppressed);
}
throw ule;
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does loadLibrary() do?
loadLibrary() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/internal/NativeLibraryLoader.java.
Where is loadLibrary() defined?
loadLibrary() is defined in common/src/main/java/io/netty/util/internal/NativeLibraryLoader.java at line 381.
What does loadLibrary() call?
loadLibrary() calls 2 function(s): loadLibraryByHelper, tryToLoadClass.
What calls loadLibrary()?
loadLibrary() is called by 1 function(s): load.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free