本文介绍了在Eclipse上安装SCIP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使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?

非常感谢您.

推荐答案

JNI库中的文件名存在问题.我已解决此问题,并更新了库此处.请注意,您需要具有64位版本的Java才能运行SCIP-JNI.

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
  1. 将JniKnapsack.java复制到新的Java项目中
  2. 将scip.jar添加为外部JAR(属性> Java构建路径> 添加外部Jars )
  3. 将libjscip *.{dll,lib}和libscip-3.2.1 *.{dll,lib}放在scip.jar旁边或新项目的主目录中
  4. System.loadLibrary("libjscip-0.1.mingw.x86_64.msvc.opt.spx");
  5. 替换JniKnapsack.java中的行JniScipLibraryLoader.loadLibrary();
  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");

现在,您应该可以将程序作为 Java应用程序运行.

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

这篇关于在Eclipse上安装SCIP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 05:58