[英]GLPK java java.lang.UnsatisfiedLinkError: Can't find dependent libraries
The dynamic link library for GLPK for Java could not be loaded. 无法加载GLPK for Java的动态链接库。 Consider using
考虑使用
java -Djava.library.path=
The current value of system property java.library.path is:
\\MILP\lib\glpk-4.55\w64
Exception in thread "main" java.lang.UnsatisfiedLinkError:
\\MILP\lib\glpk-4.55\w64\glpk_4_55_java.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at org.gnu.glpk.GLPKJNI.<clinit>(GLPKJNI.java:24)
at org.gnu.glpk.GLPK.glp_version(GLPK.java:2259)
at TestMain.main(TestMain.java:7)
Still the problem persists, 问题仍然存在,
One doubt I have is that the \\MILP\\lib\\glpk-4.55\\w64\\glpk_4_55_java.dll file is flawed. 我有一个疑问是\\ MILP \\ lib \\ glpk-4.55 \\ w64 \\ glpk_4_55_java.dll文件有缺陷。 I checked it using dependencyWalker there it shows some warnings
我使用dependencyWalker检查了它,那里显示了一些警告
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.
Any leads would be appreciated 任何线索将不胜感激
I also faced same issue. 我也面临同样的问题。 I copied glpk_4_55.dll and glpk_4_55_java.dll to C:\\Windows\\System32 and Everything works fine for me.
我将glpk_4_55.dll和glpk_4_55_java.dll复制到了C:\\ Windows \\ System32,一切对我来说都很好。
You can add the C:\\Program Files\\GLPK\\glpk-4.55\\w64 folder to your PATH environment variable 您可以将C:\\ Program Files \\ GLPK \\ glpk-4.55 \\ w64文件夹添加到PATH环境变量中
or 要么
copy the glpk_4_55.dll and glpk_4_55_java.dll to C:\\Windows\\System32 as suggested by Pradeepb 按照Pradeepb的建议将glpk_4_55.dll和glpk_4_55_java.dll复制到C:\\ Windows \\ System32
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.