如何在IntelliJ IDEA 12中使用OpenCV [英] How to use OpenCV with IntelliJ IDEA 12
问题描述
我正在尝试使用IntelliJ IDEA 12在Java中开发OpenCV 2.4.5应用程序。我已经从网站上按照Eclipse的说明进行操作。这里。
I'm trying to use IntelliJ IDEA 12 to develop OpenCV 2.4.5 applications in Java. I've followed the instructions for Eclipse from the website here.
我遇到的问题是我可以将jar添加到我的库中,但我不知道如何将本机添加到我的库中类路径。
The problem I am running into is that I can add the jar to my library but I don't know how to add the natives to my classpath.
推荐答案
为了在Java中使用本机库,您需要指定java.library.path系统属性,以便JVM知道要查找它们。
In order to use native libraries in Java you need to specify java.library.path system property, so that JVM knows where to look for them.
在IntelliJ中可以在运行/调试配置 - >应用程序 - > VM选项中完成,输入:
In IntelliJ this be can be done in Run/Debug Configuration -> Application -> VM options, enter:
-Djava.library.path=path/to/dll
这篇关于如何在IntelliJ IDEA 12中使用OpenCV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!