IBM Optimization Studio CPLEX OPL jar返回错误的版本

时间:2015-05-13 09:53:34

标签: java eclipse windows cplex opl

我一直在Eclipse中使用IBM OPL Java API库来运行我的Java中的OPL模型和数据文件。这在Eclipse中运行良好,但现在我已将程序编译为可执行jar并尝试在Windows 7命令行上运行它我得到一个错误。我所有自己的代码运行正常,直到包含ilog.opl.IloOpl对象的第一行,这是我收到以下错误:

 No version in manifest (not in a jar?), trying 1260
 No version in manifest (not in a jar?), trying 1260
 Native code library failed to load: ensure the appropriate library (opl1260.dll/.so) is in your path.
 Exceptions:
 no opl1260 in java.library.path
 no opl_lang_wrap_cpp in java.library.path
 no opl_core_wrap_cpp_java1260 in java.library.path
 no opl_core_wrap_cpp in java.library.path
 no cp_wrap_cpp_java1260 in java.library.path
 no cp_wrap_cpp in java.library.path
 no concert_wrap_cpp_java1260 in java.library.path
 no concert_wrap_cpp in java.library.path
 It might also be related to missing Microsoft Visual C++ Redistributable Package.
 Exception in thread "main" java.lang.ExceptionInInitializerError
    at      ilog.concert.cppimpl.concert_wrap.setDebugWrappers(concert_wrap.java:18)
    at ilog.opl.IloOplFactory.setDebugMode(IloOplFactory.java:156)
    at Simulator.SimManager.solve(SimManager.java:422)
    at Simulator.SimManager.runScaleTests(SimManager.java:133)
    at Simulator.SimManager.main(SimManager.java:105)
 Caused by: java.lang.RuntimeException: Native code library failed to load:    ensure the appropriate library (opl1260.dll/.so) is in your path.
 Exceptions:
 no opl1260 in java.library.path
 no opl_lang_wrap_cpp in java.library.path
 no opl_core_wrap_cpp_java1260 in java.library.path
 no opl_core_wrap_cpp in java.library.path
 no cp_wrap_cpp_java1260 in java.library.path
 no cp_wrap_cpp in java.library.path
 no concert_wrap_cpp_java1260 in java.library.path
 no concert_wrap_cpp in java.library.path
 It might also be related to missing Microsoft Visual C++ Redistributable Package.
    at ilog.concert.IloJNILoader.loadJNI(IloJNILoader.java:85)
    at ilog.concert.cppimpl.concert_wrapJNI.<clinit>(concert_wrapJNI.java:15)
    ... 5 more

但奇怪的是......我有Studio 12.6.1,而不是12.6.0。我在C:\ Program Files \ IBM \ ILOG \ CPLEX_Studio1261 \ opl \ lib中引用了OPLall.jar文件,我的PATH也包含了这个文件夹。

我尝试使用Google搜索并遇到了这些相关问题=

不同之处在于,在这些问题中,程序似乎识别出正确的版本。由于某种原因,我的程序正在寻找错误的文件夹和错误的文件(opl1260不存在,虽然opl1261.dll就在文件夹中)。

OPLall.jar(我从IBM文件夹中复制)MANIFEST包含以下内容:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: IBM Corporation
Specification-Title: IBM ILOG CPLEX OPTIMIZATION STUDIO Java API
Specification-Version: 12.6
Specification-Vendor: IBM
Implementation-Title: IBM ILOG CPLEX OPTIMIZATION STUDIO Java API
Implementation-Version: 12.6.1.0
Implementation-Vendor: IBM
Build-Date: 2014-11-18

有谁知道如何解决这个问题?

编辑:我还重新安装了Microsoft Visual C ++ 2010 SP1可再发行组件包(x64),因为错误日志中提到了这一点,但这并没有改变问题。我也尝试重新安装IBM Studio但又遇到了同样的问题。

0 个答案:

没有答案