java - Running OpenCV using Maven on intellij -


i trying run opencv using maven in intellij (i understand there no official way using unofficial way described in tutorial).

i working according following tutorial.

i used provided pom , tried downloading code (chapter 1) , have no errors when compiling.

however upon executing code (specifically system.loadlibrary(core.native_library_name), following error:

java.lang.unsatisfiedlinkerror: no opencv_java300 in java.library.path

according of answers found because must copy jar files lib folder when creating jars. however, understood mavendependency-plugin should that.

i believe error might because of outputdirectory (${project.build.directory}/lib), unable figure out correct directory.

i not understand problems are.

thanks help.

the pom file:

    <?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0"          xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"          xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">     <modelversion>4.0.0</modelversion>      <groupid>com.mycompany.app</groupid>     <artifactid>my-opencv-app</artifactid>     <version>1.0-snapshot</version>      <repositories>         <repository>             <id>javaopencvbook</id>             <url>https://raw.github.com/javaopencvbook/code/maven2/</url>         </repository>     </repositories>     <build>         <plugins>             <plugin>                 <artifactid>maven-jar-plugin</artifactid>                 <version>2.4</version>                 <configuration>                     <archive>                         <manifest>                             <addclasspath>true</addclasspath>                             <classpathprefix>lib/</classpathprefix>                             <mainclass>com.mycompany.app.app</mainclass>                         </manifest>                     </archive>                 </configuration>             </plugin>             <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-dependency-plugin</artifactid>                 <version>2.1</version>                 <executions>                     <execution>                         <id>copy-dependencies</id>                         <phase>package</phase>                         <goals>                             <goal>copy-dependencies</goal>                         </goals>                         <configuration>                             <outputdirectory>${project.build.directory}/lib</outputdirectory>                             <overwritereleases>false</overwritereleases>                             <overwritesnapshots>false</overwritesnapshots>                             <overwriteifnewer>true</overwriteifnewer>                         </configuration>                     </execution>                 </executions>             </plugin>             <plugin>                 <groupid>com.googlecode.mavennatives</groupid>                 <artifactid>maven-nativedependencies-plugin</artifactid>                 <version>0.0.7</version>                 <executions>                     <execution>                         <id>unpacknatives</id>                         <phase>generate-resources</phase>                         <goals>                             <goal>copy</goal>                         </goals>                     </execution>                 </executions>             </plugin>         </plugins>     </build>      <dependencies>         <dependency>             <groupid>junit</groupid>             <artifactid>junit</artifactid>             <version>3.8.1</version>             <scope>test</scope>         </dependency>          <dependency>             <groupid>org.javaopencvbook</groupid>             <artifactid>opencvjar</artifactid>             <version>3.0.0</version>         </dependency>          <dependency>             <groupid>org.javaopencvbook</groupid>             <artifactid>opencvjar-runtime</artifactid>             <version>3.0.0</version>             <classifier>natives-windows-x86_64</classifier>         </dependency>      </dependencies> </project> 


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -