繁体   English   中英

如何使用CPLEX配置IntelliJ Idea

[英]How to configure IntelliJ Idea with CPLEX

我读了很多论坛,但我还没有找到任何有关IntelliJ Idea的内容。

我不是开发人员,但我在Debian上管理Tomcat8服务器。

开发人员希望在其Grails应用程序中使用IBM ILOG CPLEX。 他使用IDE“IntelliJ Idea”。 他会通过创建这样的对象来使它工作:

// Create the shape / object solver
            IloCplex CPLEX IloCplex = new ();
            System.out.println ( "\ n IloCplex CPLEX IloCplex = new ();");
        ...
        ...

PC用户是一个Windows,并安装了IntelliJ IDEA和CPLEX。 使用此配置程序可以运行。

当程序导出.war并转移到tomcat服务器时,它不再有效。

我们有错误:

Error 500: Internal Server Error

    line | method
- 1145 >> | runWorker in java.util.concurrent.ThreadPoolExecutor
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 615 | run in java.util.concurrent.ThreadPoolExecutor $ Worker
^ 745 | run. . . in java.lang.Thread

Caused by ControllerExecutionException: Runtime error executing actions
- 1145 >> | runWorker in java.util.concurrent.ThreadPoolExecutor
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 615 | run in java.util.concurrent.ThreadPoolExecutor $ Worker
^ 745 | run. . . in java.lang.Thread

Caused by InvocationTargetException: null
- 1145 >> | runWorker in java.util.concurrent.ThreadPoolExecutor
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 615 | run in java.util.concurrent.ThreadPoolExecutor $ Worker
^ 745 | run. . . in java.lang.Thread

Caused by UnsatisfiedLinkError: ilog.cplex.Cplex.CPXopenCPLEX ([I) J
- 6594 >> | init in ilog.cplex.CplexI
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 629 | <Init> in '
| 11067 | <Init>. ilog.cplex.IloCplex in
| 11082 | <Init> in '
| 93 | save. . agriplan.APProjectController in
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run. . . java.util.concurrent.ThreadPoolExecutor $ Worker in
^ 745 | run in java.lang.Thread

开发人员告诉我它来自IloCplex CPLEX IloCplex = new(); 它不起作用。

我想问题是找不到CPLEX的程序所以我在Grails选项“VM选项”中添加了CPLEX的路径:

-Djava.library.path = / Opt / IBM / ILOG / CPLEX_Studio126 / CPLEX / bin / x86-64_linux

但我有同样的错误

用户没有忘记在程序库中实现cplex.jar

问题出在服务器端还是应用程序内? 他在IntelliJ Idea的其他地方有话要说吗?

我们应该在IntelliJ Idea中声明其他内容吗?

非常感谢你

如果运行CPLEX附带的Java示例,是否会出现相同的错误? 要测试这一点,您可以执行以下操作(假设您的路径从上面是正确的):

$ cd /Opt/IBM/ILOG/CPLEX_Studio126/CPLEX/examples/x86-64_linux/static_pic
$ make execute_java 2>&1 | tee output.txt

这将保存output.txt中的输出,以便您以后查看。 它应该让您了解所需的命令行参数是什么。

例如,在我的系统上,我在output.txt中看到了以下一个示例:

java  -d64 -Djava.library.path=../../../bin/x86-64_linux -classpath ../../../lib/cplex.jar: LPex3

你们很多人只需要将-d64-classpath (带有正确的路径)添加到“VM选项”部分(我没有使用过IntelliJ,但“VM选项”听起来很合理)。

最后,请参阅配置Eclipse Java IDE以使用CPLEX库 (IBM技术说明应该可以让您了解IDE中所需的内容)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM