问题
I am trying to make the SCIP work with Java/Windows 7. I have installed Eclipse Mars.
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?
Thank you very much.
回答1:
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.
Do the following steps to run the JniKnapsack example which you can find in
<scipdir>/interfaces/jni/examples/JniKnapsack/java/JniKnapsack.java
- 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");
Now you should be able to run the program as an Java Application.
来源:https://stackoverflow.com/questions/37001271/install-scip-on-eclipse