I had an OpenJFX project in Eclipse which have severals Maven projects. I have a native library called EDSDK which is a library to interact with Canon Photo Cameras. This library have several DLLs and the JAR are all located in a directory called "libs" at the root of the project. In Eclipse there is no problems, the application run and find the library without problems. When i wanted to import this project in IntelliJ i faced two problems. First, how the paths are handled looked different. I had to change a bit the path to the configuration folder located at the root of the project aswell. The second problem i faced is that the native library wasn't found whatever i have done in IntelliJ (Linking inFile->Project Structure, etc.). It only worked when i copied the "libs" folder in the main app ".../target/classes" folder as as the error was saying ...
Exception in thread "cmd-dispatcher-0" java.lang.UnsatisfiedLinkError: Unable to load library '../libs/EDSDK_64/Dll/EDSDK.dll': Native library (win32-x86-64/../libs/EDSDK_64/Dll/EDSDK.dll) not found in resource path (C:\ws\PostePhotoTemp\poste-photo-ui\target\classes;C:\ws\PostePhotoTemp\poste-photo-modele\target\classes;C:\Users\xyz01.m2\repository\net\java\dev\jna\jna\4.5.2\jna-4.5.2.jar;... (long list of JAR files)
It first tried to look in the "target\classes" then in a long list of JAR files. What i am doing wrong ? I expected to have the same behavior in IntelliJ than Eclipse.
EDIT: I found out that if i put the "libs" folder one level outside the project, it work.
Thanks!