OStack程序员社区-中国程序员成长平台

标题: java - How to use OpenCV with IntelliJ IDEA 12 [打印本页]

作者: 菜鸟教程小白    时间: 2022-6-22 22:05
标题: java - How to use OpenCV with IntelliJ IDEA 12

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.

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.



Best Answer-推荐答案


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.

In IntelliJ this be can be done in Run/Debug Configuration -> Application -> VM options, enter:

-Djava.library.path=path/to/dll





欢迎光临 OStack程序员社区-中国程序员成长平台 (http://ostack.cn/) Powered by Discuz! X3.4