I have been trying to develop a play framework application. i am using opencv (.jar + native library) in this application. When i try to run the application with
play start
command the application runs fine and perfect. when tried with
play run
and it needs to access the opencv methods it gets a runtime error saying
java.lang.UnsatisfiedLinkError: org.opencv.highgui.Highgui.imread_0(Ljava/lang/String;I)J
at org.opencv.highgui.Highgui.imread_0(Native Method)
at org.opencv.highgui.Highgui.imread(Highgui.java:299)
at com.allspark.scanners.LabelImScanner.readLabel(LabelImScanner.java:39)
at com.allspark.controllers.imageController.uploadLabel(imageController.java:55)
at Routes$$anonfun$routes$1$$anonfun$applyOrElse$19$$anonfun$apply$19.apply(routes_routing.scala:289)
at Routes$$anonfun$routes$1$$anonfun$applyOrElse$19$$anonfun$apply$19.apply(routes_routing.scala:289)
then I tried to run the application in production mode then everything works fine. I need to know how to load the native library to play application runs in development mode. This issue already discussed in followings: https://groups.google.com/forum/#!topic/play-framework/A3cL3dkD70I https://github.com/playframework/playframework/issues/2212 How to include native library (JNI) in play 2.1 RC2?
but unfortunately nothing works for development mode application. I am using play famework 2.2.0 and opencv-246. If anyone can give support that would be great help.Thank you. Appreciate your help