【问题标题】:Exception cplex异常复杂
【发布时间】:2020-04-26 23:03:43
【问题描述】:

我遇到了这个异常:

Exception in thread "main" java.lang.UnsatisfiedLinkError: ilog.concert.cppimpl.concert_wrapJNI.swig_module_init()V
    at ilog.concert.cppimpl.concert_wrapJNI.swig_module_init(Native Method)
    at ilog.concert.cppimpl.concert_wrapJNI.<clinit>(concert_wrapJNI.java:1619)
    at ilog.concert.cppimpl.concert_wrap.setDebugWrappers(concert_wrap.java:18)
    at ilog.opl.IloOplFactory.setDebugMode(IloOplFactory.java:170)

我正在使用这个类路径在 Windows 上工作:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
        <attributes>
            <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="C:/IBM/opl/bin/x64_win64"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="lib" path="C:/IBM/cplex/lib/cplex.jar">
        <attributes>
            <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="C:/IBM/cplex/bin"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="lib" path="C:/IBM/opl/lib/oplall.jar"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

感谢您的帮助

【问题讨论】:

    标签: java cplex eclipse-classpath


    【解决方案1】:

    不要同时将oplall.jarcplex.jar 放到类路径中。这可能会引起麻烦。

    还要确保包含 CPLEX dll 的路径位于您的 java.library.path 上。

    【讨论】:

    • 我正在尝试执行 OPL 项目以从文件 .mod 加载数据。我认为 Cplex 可能没有必要。请看下方评论。非常感谢。
    猜你喜欢
    • 1970-01-01
    • 2014-04-04
    • 2016-08-04
    • 2020-10-11
    • 2013-07-24
    • 2014-03-12
    • 2021-03-25
    • 1970-01-01
    相关资源
    最近更新 更多