I have almost the same situation as in this question: Trying to make java application (Executable Jar) that uses OpenCV portable. Getting unsatisfied link error. And this question and questions linked and related to this one helps me to understand more. But I still need help with my problem. My question actually splits onto two interrelated questions:
How to determine files of opencv library actually needed for my application (just to grab video)
On my development computer there is a number of directories with obviously the same collection of dll files of opencv2.4.2 (as i understand only dll files needed):
- opencv/build/x86/mingw
- opencv/build/x86/vc9
- opencv/build/x86/vc10
- opencv/build/x64/mingw
- opencv/build/x64/vc9
- opencv/build/x64/vc10
I understand division onto x86 and x64, but what about mingw/vc9/vc10?
How to organize them to my portable build?
When i'm creating runnable jar from my project, i have nice option "Copy required libraries into sub-folder next to the generated JAR". The folder usually has name of form "_myApp__lib". Suppose I placed required dll files to that sub-folder as well. How to make my runnable jar see them? And can i do this without -Djava.library.path? And is it possible to place dll files to separate jar?