[英]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.