My understanding of native code is that it gets loaded using a different mechanism to the classpath. Put your library somewhere (possibly outside of the play dist zip), and then supply this argument to the play start command:
-Djava.library.path=D:\path\to\your\dll\directory
To do the same during development is a bit harder, you'll probably need to modify the play start script to supply custom arguments to the SBT JVM.
Hope this helps,
James
On Thursday, 23 August 2012 09:49:33 UTC+2, Ronald wrote:
Hey there,
I'm trying to integrate tapi functionality into a play app, but I have trouble loading the native library (TapiProvider.dll) that is needed for this to work. TapiProvider.dll is used by
GJTAPI. As of now, I'm able to communicate with the telephone system through a
standalone scala application.
For play, this is the approach I tried. I use the same object and call initTerminals in onStart of the Global object. As it seems the dll is not loaded as the tapi3 service isn't available inside the play application. If I try to load it manually (System.load("D:\\play-projects\\autepro\\lib\\Tapi3Provider.dll")) I get the following on the
second request:
UnsatisfiedLinkError: Native Library D:\play-projects\autepro\lib\Tapi3Provider.dll already loaded in another classloader
and still the service is missing.
I know that my request seems rather special. :/ Any suggestion from your side is much appreciated and if you need any information feel free to ask for it. If play doesn't support this scenario I'll have to try to stick with the standalone scala application.