io.netty.util.internal.NativeLibraryLoader.class Maven / Gradle / Ivy
???? 2? *io/netty/util/internal/NativeLibraryLoader java/lang/Object NativeLibraryLoader.java ?io/netty/util/internal/NativeLibraryLoader$NoexecVolumeDetector NoexecVolumeDetector ,io/netty/util/internal/NativeLibraryLoader$2 ,io/netty/util/internal/NativeLibraryLoader$1 logger /Lio/netty/util/internal/logging/InternalLogger; NATIVE_RESOURCE_HOME Ljava/lang/String; META-INF/native/ OSNAME WORKDIR Ljava/io/File; DELETE_NATIVE_LIB_AFTER_LOADING Z tmpdir ()Ljava/io/File; java/lang/Exception io.netty.tmpdir )io/netty/util/internal/SystemPropertyUtil get &(Ljava/lang/String;)Ljava/lang/String; !
" toDirectory "(Ljava/lang/String;)Ljava/io/File; $ %
&
( java/lang/StringBuilder * ()V , -
+ . -Dio.netty.tmpdir: 0 append -(Ljava/lang/String;)Ljava/lang/StringBuilder; 2 3
+ 4 -(Ljava/lang/Object;)Ljava/lang/StringBuilder; 2 6
+ 7 toString ()Ljava/lang/String; 9 :
+ ; -io/netty/util/internal/logging/InternalLogger = debug (Ljava/lang/String;)V ? @ > A java/io/File C java.io.tmpdir E (java.io.tmpdir) G isWindows ()Z I J
K TEMP M java/lang/System O getenv Q !
P R (%TEMP%) T USERPROFILE V \AppData\Local\Temp X # (%USERPROFILE%\AppData\Local\Temp) Z java/lang/String \ \Local Settings\Temp ^ $ (%USERPROFILE%\Local Settings\Temp) ` TMPDIR b
($TMPDIR) d C:\Windows\Temp f , @
D h /tmp j 8Failed to get the temporary directory; falling back to: l warn n @ > o userprofile f mkdirs s J
D t isDirectory v J
D w getAbsoluteFile y
D z ignored Ljava/lang/Exception; path windows ?
startsWith (Ljava/lang/String;)Z ? ?
] ? isOSX macosx ? osx ? loadFirstAvailable -(Ljava/lang/ClassLoader;[Ljava/lang/String;)V java/lang/Throwable ? [Ljava/lang/String; ? load ,(Ljava/lang/String;Ljava/lang/ClassLoader;)V ? ?
? #Successfully loaded the library: {} ? '(Ljava/lang/String;Ljava/lang/Object;)V ? ? > ? java/lang/ClassLoader ? 4Unable to load the library '{}', trying next name... ? 9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V ? ? > ? "java/lang/IllegalArgumentException ? +Failed to load any of the given libraries: ? java/util/Arrays ? '([Ljava/lang/Object;)Ljava/lang/String; 9 ?
? ?
? h t Ljava/lang/Throwable; name loader Ljava/lang/ClassLoader; names java/lang/UnsatisfiedLinkError ? io.netty.packagePrefix ? ? 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; ?
? replace (CC)Ljava/lang/String; ? ?
] ? mapLibraryName ? !
P ? getResource "(Ljava/lang/String;)Ljava/net/URL; ? ?
? ? ? J
? .jnilib ? endsWith ? ?
] ? META-INF/native/lib ? .dynlib ? java/net/URL ? loadLibrary -(Ljava/lang/ClassLoader;Ljava/lang/String;Z)V ? ?
? lastIndexOf (I)I ? ?
] ? substring (II)Ljava/lang/String; ? ?
] ? length ()I ? ?
] ? ? createTempFile B(Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)Ljava/io/File; ? ?
D ?
openStream ()Ljava/io/InputStream; ? ?
? ? java/io/FileOutputStream ? (Ljava/io/File;)V , ?
? ? java/io/InputStream ? java/io/OutputStream ? [B ? read ([B)I ? ?
? ? write ([BII)V ? ?
? ? flush -
? closeQuietly (Ljava/io/Closeable;)V
getPath :
D
delete J
D
deleteOnExit -
D isFile J
D canRead J
D
access$000 (Ljava/io/File;)Z
?{} exists but cannot be executed even when execute permissions set; check volume for "noexec" flag; use -Dio.netty.native.workdir=[path] to set native working directory separately. info ? > ;Error checking if {} is on a file store mounted with noexec! !could not load a native library: #
? h initCause ,(Ljava/lang/Throwable;)Ljava/lang/Throwable;&'
?( buffer I e Ljava/lang/UnsatisfiedLinkError; originalName libname url Ljava/net/URL; index prefix suffix in Ljava/io/InputStream; out Ljava/io/OutputStream; tmpFile (io/netty/util/internal/NativeLibraryUtil: tryToLoadClass ;(Ljava/lang/ClassLoader;Ljava/lang/Class;)Ljava/lang/Class;<=
> loadLibraryByHelper '(Ljava/lang/Class;Ljava/lang/String;Z)V@A
B @Unable to load the library '{}', trying other loading mechanism.D (Ljava/lang/String;Z)V ?F
;G newHelper Ljava/lang/Class<*>; Ljava/lang/Class; absolute ,A
M java/security/AccessControllerO doPrivileged 4(Ljava/security/PrivilegedAction;)Ljava/lang/Object;QR
PS getCause ()Ljava/lang/Throwable;UV
?W
getMessageY :
?Z error cause helper ret Ljava/lang/Object; java/lang/ClassNotFoundExceptiona java/lang/Classc getNamee :
df loadClass %(Ljava/lang/String;)Ljava/lang/Class;hi
?j classToByteArray (Ljava/lang/Class;)[Blm
n -(Ljava/lang/ClassLoader;Ljava/lang/Class;[B)V ,p
q classBinary "Ljava/lang/ClassNotFoundException; java/io/IOExceptionu (I)Ljava/lang/String; ?w
]x .classz
d ?
b h java/io/ByteArrayOutputStream~ (I)V ,?
?
? toByteArray ()[B??
? *(Ljava/lang/String;Ljava/lang/Throwable;)V ,?
b? r ex Ljava/io/IOException; clazz fileName lastDot classUrl buf Ljava/io/ByteArrayOutputStream; java/io/Closeable? close? -?? c Ljava/io/Closeable;
. this ,Lio/netty/util/internal/NativeLibraryLoader; 4io/netty/util/internal/logging/InternalLoggerFactory? getInstance B(Ljava/lang/Class;)Lio/netty/util/internal/logging/InternalLogger;??
?? os.name? java/util/Locale? US Ljava/util/Locale;?? ?? toLowerCase &(Ljava/util/Locale;)Ljava/lang/String;??
]?
[^a-z0-9]+?
replaceAll? ?
]? io.netty.native.workdir? -Dio.netty.native.workdir: ?
? (io.netty.tmpdir)? %io.netty.native.deleteLibAfterLoading?
getBoolean (Ljava/lang/String;Z)Z??
? workdir
ConstantValue Code LocalVariableTable LineNumberTable
StackMapTable LocalVariableTypeTable
Exceptions Signature *(Ljava/lang/Class<*>;Ljava/lang/String;Z)V A(Ljava/lang/ClassLoader;Ljava/lang/Class<*>;)Ljava/lang/Class<*>; (Ljava/lang/Class<*>;)[B
SourceFile InnerClasses 1
?
? ? ?? #? 'K*? ? )? +Y? /1? 5*? 8?