Install SCIP on Eclipse

2020-05-06 13:33发布

问题:

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
  1. copy the JniKnapsack.java into a new Java project
  2. add the scip.jar as an external JAR (Properties > Java Build Path > Add External Jars)
  3. 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
  4. replace the line JniScipLibraryLoader.loadLibrary(); in JniKnapsack.java with System.loadLibrary("libjscip-0.1.mingw.x86_64.msvc.opt.spx");

Now you should be able to run the program as an Java Application.



标签: scip