Hey guys,
I need to include three DLL's in my Maven project. Prior to deciding to
email the list, I have looked around the archives, and haven't been able to
find anything that would seem to answer my problem (which is a very easy one
in nature).

I use JNA to interface with two of the three DLL's (the third one is for
Jacob, and its location needs to be set as a system variable).

In Java, I do the following:

URL libURL = this.getClass().getResource("/org/git/systems/DLLs/");
System.setProperty("jna.library.path", libURL.getPath());

And then declare the following interface

public interface CurviLibrary extends Library {
CurviLibrary CurviInitialization = (CurviLibrary)
Native.loadLibrary("Curvi",CurviLibrary.class);
CurviLibrary OptimizedSolver = (CurviLibrary)
Native.loadLibrary("OptimizedSolver",CurviLibrary.class);
DoubleByReference GIT_CURVIG(float[] timeData, float[] rawData, float[]
relax, int rawDataSize, double alphaValue,
long numberOfBins);
}

So when compiled via Eclipse, this works like a charm. I have tried placing
the DLL's within /main/resources/org/git/systems/DLLs but this does not seem
to work, as the jar looks in
file:/C:/DEV/Maven/GITSYSTEMS/target/GITSYSTEMS-1.0-jar-with-dependencies.jar!/org/git/systems/DLLs/
which would make sense, if only a jar wasn't a package.

How may I go about adding these DLLs to my Maven project, without having to
modify the existing Java code?

I am assuming they will have to go outside of the jar, but I am unsure as to
how to reference and go from there.

Thanks guys!

Reply via email to