Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
227 views
in Technique[技术] by (71.8m points)

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...