Hi guys,
I am using jni4net in a maven project but stuck on a config issue.
I created a local repo (<repository>...<url>file:///${project.basedir}/local-maven-repo</url>...</repository>), install all jni4net lib files to it (e.g., mvn deploy:deploy-file ... -Dfile=build\jni4net.n-0.8.8.0.dll) and specify dependencies accordingly.
Compilation is successful. But when running the program, an exception shows:
Can't load library: C:\Users\...\target\dependency\jni4net-jar-0.8.8.0.dll
Exception in thread "Thread-2" net.sf.jni4net.inj.INJException: Can't initialize jni4net Bridge
at net.sf.jni4net.CLRLoader.init(CLRLoader.java:45)
at net.sf.jni4net.Bridge.init(Bridge.java:35)
at net.sf.jni4net.Bridge.init(Bridge.java:31)
The strange thing is that the file name jni4net-jar-0.8.8.0.dll should never exist. There do exist both jni4net-dll-0.8.8.0.dll and jni4net-jar-0.8.8.0.jar in that dependency dir, as expected. But where does the wrong name come from in runtime? How to solve this problem?
BTW, what is the best practice to integrate jni4net to a maven project? Any guideline? I'd guess it should be one typical use scenario.
Thanks,
Jinglei