在Eclipse上安装SCIP [英] Install SCIP on Eclipse
问题描述
我正在尝试使SCIP与Java/Windows 7一起使用.我已经安装了Eclipse Mars.
I am trying to make the SCIP work with Java/Windows 7. I have installed Eclipse Mars.
我对SCIP有点陌生.我通读了安装过程,并尝试安装SCIP.但是我不清楚安装过程.我下载了此库,并像以前一样安装了.jar和.dll,但是,关于Java中SCIP的在线示例很少,因此我无法正确导入. 谁能告诉我如何安装SCIP或为我提供示例吗?
I am kind of new to the SCIP. I read through the installation procedure and try to install the SCIP. But I can't understand the installation procedure clearly. I downloaded this library, and installed the .jar and the .dll like I am used to do, however there are very few examples online about SCIP in Java, and I can't import this correctly. Can anyone tell me how to install the SCIP or guide me to an example?
非常感谢您.
推荐答案
There was an issue with the file names in the JNI library. I fixed this issue and updated the library here. Please note that you need to have a 64bit version of Java to run the SCIP-JNI.
执行以下步骤来运行JniKnapsack示例,您可以在
Do the following steps to run the JniKnapsack example which you can find in
<scipdir>/interfaces/jni/examples/JniKnapsack/java/JniKnapsack.java
- 将JniKnapsack.java复制到新的Java项目中
- 将scip.jar添加为外部JAR(属性> Java构建路径> 添加外部Jars )
- 将libjscip *.{dll,lib}和libscip-3.2.1 *.{dll,lib}放在scip.jar旁边或新项目的主目录中
- 用
System.loadLibrary("libjscip-0.1.mingw.x86_64.msvc.opt.spx");
替换JniKnapsack.java中的行
JniScipLibraryLoader.loadLibrary();
- copy the JniKnapsack.java into a new Java project
- add the scip.jar as an external JAR (Properties > Java Build Path > Add External Jars)
- put the libjscip*.{dll,lib} and libscip-3.2.1*.{dll,lib} next to the scip.jar or inside the main directory of your new project
- replace the line
JniScipLibraryLoader.loadLibrary();
in JniKnapsack.java withSystem.loadLibrary("libjscip-0.1.mingw.x86_64.msvc.opt.spx");
现在,您应该可以将程序作为 Java应用程序运行.
Now you should be able to run the program as an Java Application.
这篇关于在Eclipse上安装SCIP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!