我有一个使用 GLPK Solver 的 java 程序。我在eclipse上运行它时收到的错误如下:
The dynamic link library for GLPK for Java could not beloaded.
Consider using
java -Djava.library.path=
The current value of system property java.library.path is:
/Users/maria/Documents/solver_library/GLPK/w64
我在我的旧 Windows 计算机上遇到了同样的问题,我通过以下方式解决了它: 1. 在 Java Build Path->Libraries 中添加 glpk-java.jar 文件 2. 添加作为上述 jar 的本机库位置相应路径(C:\ProgramFiles\solver_library\GLPK\w64 3. 在 PATH 环境变量中添加上述路径。
我在我的新 MAC OS X 计算机上做完全相同的事情,但仍然收到上述错误。我以与上述步骤 1 和 2 完全相同的方式完成了操作,并且还通过终端修改了 PATH 系统变量。现在是:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/maria/Documents/solver_library/GLPK/w64
你能告诉我你是否知道如何解决这个问题?我是一个新的Mac用户,所以我不知道很多事情。
提前致谢!