java - 异常复杂
问题描述
我有这个例外:
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>
谢谢您的帮助
解决方案
不要同时将oplall.jar
和cplex.jar
放到类路径中。那可能会引起麻烦。
还要确保包含 CPLEX dll 的路径位于您的java.library.path
.
推荐阅读
- mysql - 如何在SQL中查询当年月份的月份和天数?
- javascript - 我网站前端的简单文本格式(替换字符)?
- java - 单击下拉按钮后,如何清除组合框的默认值?
- c++ - Soapcpp2 不生成 ns1 服务文件
- javascript - 在方法内将图像 onload 添加到画布不起作用
- java - 如何在 RecylerView 中保存“PDF”文件?
- postgresql - TypeORM:在运行时为 EntityManager(或存储库)动态设置数据库模式?
- c# - 将带有特殊字符的字符串转换为十六进制 - C#
- awk - How can I use sed to generate an awk file?
- python - 如何获取列表框中项目的索引