I'm trying to get OpenCV set up in IntelliJ, however I'm stuck on figuring out how tell IntelliJ where to find the native library location.
In Eclipse, after adding a jar, you can set the location of the Native library in the Build Config screen.
e.g.
Does anyone know how to do this in IntelliJ IDE?
I'm not sure you need it as a dependency, you just need to add the option to the VM invocation so the library is found at run-time.
At least in the first sample I have looked at (samples/java/ant/SimpleSample) the native library is loaded at runtime with these lines:
So, the library is not a compiM to find the native library at run-time, specify the java.library.path to point to the directory where the library can be found, using the -D VM option - in your IntelliJ run configuration.
NOTE: If on Mac OS X you need to create a copy/link of the .so shared library built to one with the same name, but the .dynlib extension
Once the library is added, you can set the Native Library Location as follows:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With