Let's say mine JNI.dll. It depends on native.dll. Now my Java application is calling System.loadLibrary("JNI").
Does the following folder work?
MainFolder
|
|
|
|
I assume that there are 2 levels of dependency resolution.
[Level 1]:
System.loadLibrary("JNI")uses the JVM property java.library.pathto search JNI.dll.
[Level 2]:
JNI.dllrelies on the Windows system engine to find native.dll.
It is right?
If I set %_JAVA_OPTIONS%how -Djava.library.path=MainFolder\SubFolder, I think it can cover the search JNI.dll. But will it cover the search native.dlltoo?
ADD 1
, 2 : "java.library.path" Eclipse ( )
kevin cline. LD_LIBRARY_PATH Linux.
ADD 2
, . .
: JNI.dll native.dll. main.exe. CWD.
main.exe , java.library.path = <other path>\MainFolder\SubFolder. .
Eclipse, , java.library.path, "\ MainFolder\SubFolder" % PATH%.
, Eclipse .