Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You must specify the libary without the ".dll" extension.

In other words:

OpenCV's Core.java look slike this:

public static final String NATIVE_LIBRARY_NAME = getNativeLibraryName();
private static String getNativeLibraryName() { return "opencv_java300"; }

Then you load the library like this:

System.loadLibrary(Core.NATIVE_LIBRARY_NAME);

So your hardcoded path should be

String libopencv_java = "C:\\eclipse\\workspace\\tomcat_try\\opencv_java300";

You I'm wondering why you get this error instead of

Caused by: java.lang.UnsatisfiedLinkError: Directory separator should not appear in library name

Anyway, you must specify a library path. Also, the libary must be without the ".dll" extension.

In other words:

OpenCV's Core.java look slike this:

public static final String NATIVE_LIBRARY_NAME = getNativeLibraryName();
private static String getNativeLibraryName() { return "opencv_java300"; }

Then you load the library like this:

System.loadLibrary(Core.NATIVE_LIBRARY_NAME);

So your hardcoded path should be

String libopencv_java = "C:\\eclipse\\workspace\\tomcat_try\\opencv_java300";

I'm wondering why you get this error instead of

Caused by: java.lang.UnsatisfiedLinkError: Directory separator should not appear in library name

Anyway, you must specify a library path. path:

-Djava.library.path=

Also, the libary must be without the ".dll" extension.

In other words:

OpenCV's Core.java look slike looks like this:

public static final String NATIVE_LIBRARY_NAME = getNativeLibraryName();
private static String getNativeLibraryName() { return "opencv_java300"; }

Then you load the library like this:

System.loadLibrary(Core.NATIVE_LIBRARY_NAME);

I'm wondering why you get this error instead of

Caused by: java.lang.UnsatisfiedLinkError: Directory separator should not appear in library name

Anyway, you must specify a library path:path when you start the VM:

-Djava.library.path=

-Djava.library.path=C:\\eclipse\\workspace\\tomcat_try

Also, the libary must be without the ".dll" extension.

In other words:

OpenCV's Core.java looks like this:

public static final String NATIVE_LIBRARY_NAME = getNativeLibraryName();
private static String getNativeLibraryName() { return "opencv_java300"; }

Then you load the library like this:

System.loadLibrary(Core.NATIVE_LIBRARY_NAME);

I'm wondering why you get this error instead of

Caused by: java.lang.UnsatisfiedLinkError: Directory separator should not appear in library name

Anyway, If you'd like to do it with loadLibrary you must specify a library path when you start the VM:

-Djava.library.path=C:\\eclipse\\workspace\\tomcat_try

Also, the libary must be without the ".dll" extension.

In other words:

OpenCV's Core.java looks like this:

public static final String NATIVE_LIBRARY_NAME = getNativeLibraryName();
private static String getNativeLibraryName() { return "opencv_java300"; }

Then you load the library like this:

System.loadLibrary(Core.NATIVE_LIBRARY_NAME);

My guess is that the library isn't loaded. If you'd like to do it with loadLibrary you must specify a library path when you start the VM:

-Djava.library.path=C:\\eclipse\\workspace\\tomcat_try

Also, the libary must be without the ".dll" extension.

In other words:

OpenCV's Core.java looks like this:

public static final String NATIVE_LIBRARY_NAME = getNativeLibraryName();
private static String getNativeLibraryName() { return "opencv_java300"; }

Then you load the library like this:

System.loadLibrary(Core.NATIVE_LIBRARY_NAME);

My guess is that the OpenCV library isn't loaded. If you'd like to do it with loadLibrary you must specify a library path when you start the VM:

-Djava.library.path=C:\\eclipse\\workspace\\tomcat_try

Also, the libary must be without the ".dll" extension.

In other words:

OpenCV's Core.java looks like this:

public static final String NATIVE_LIBRARY_NAME = getNativeLibraryName();
private static String getNativeLibraryName() { return "opencv_java300"; }

Then you load the library like this:

System.loadLibrary(Core.NATIVE_LIBRARY_NAME);