@@ -21,7 +21,6 @@ public class NativeLibraryManager {
2121 private static boolean inited ;
2222 private static boolean load ;
2323 private static Path libraryFolder ;
24- private static String relocatePath ;
2524
2625 /**
2726 * JNIライブラリを読み込む
@@ -40,15 +39,6 @@ public static void loadLibrary() {
4039 }
4140 }
4241
43- /**
44- * ShadowJarなどでNativeライブラリの場所を変更してる場合に指定
45- *
46- * @param relocatePath 移動パス
47- */
48- public static void setRelocatePath (String relocatePath ) {
49- NativeLibraryManager .relocatePath = relocatePath ;
50- }
51-
5242 /**
5343 * 読み込みに失敗したかどうか
5444 *
@@ -101,15 +91,17 @@ private static boolean loadExtractLibrary(OSs.Type os, String aarch) throws IOEx
10191
10292 private static void extractLibrary (OSs .Type os , String aarch ) throws IOException {
10393 String libname = "FNJL" + aarch + "." + os .getLibName ();
104- String pp = FelNullJavaLibrary .class .getPackage ().getName ().replace ("." , "/" ) + "/natives/" + libname ;
105-
94+ /* String cn = FelNullJavaLibrary.class.getSimpleName();
95+ String pn = FelNullJavaLibrary.class.getName();
96+ String ppa = pn.substring(0, pn.length() - cn.length() - 1).replace(".", "/");
97+ String pp = ppa + "/natives/" + libname;
98+ */
99+ String pp = "dev/felnull/fnjl/natives/" + libname ;
100+ //dev/felnull/imp/libs/dev/felnull/fnjl/dev/felnull/imp/libs/natives/FNJLx64.dll:
106101 InputStream stream = loadResource (pp );
107102
108- if (stream == null && relocatePath != null )
109- stream = loadResource (relocatePath + "/" + pp );
110-
111103 if (stream == null )
112- throw new IOException ("Library does not exist: " + pp + ( relocatePath != null ? ( " and " + relocatePath + "/" + pp ) : "" ) );
104+ throw new IOException ("Library does not exist: " + pp );
113105
114106 String name = "FNJL" + FelNullJavaLibrary .getNativeLibVersion () + aarch + "." + os .getLibName ();
115107 Path path = getNativeLibraryFolder ().resolve (name );
0 commit comments