C:\Users\Chin\Documents\NetBeansProjects\JavaFXApplication4>java -jar JavaFXApplication4.jar
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: no opencv_java401 in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at javafxapplication4.JavaFXApplication4.main(JavaFXApplication4.java:49)
... 11 more
Exception running application javafxapplication4.JavaFXApplication4
But my code compile in net bean it work
public class JavaFXApplication4 extends Application {
private static String pathopencv;
@Override
public void start(Stage primaryStage) {
System.setProperty("java.net.useSystemProxies", "true");
ImageView live = new ImageView();
threadCV1 cv = new threadCV1();
//
cv.opencvmera(pathopencv, live, 800, 600);
StackPane root = new StackPane();
root.getChildren().add(live);
Scene scene = new Scene(root, 800, 600);
primaryStage.setTitle("live Stream Link " + pathopencv);
primaryStage.setScene(scene);
primaryStage.show();
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
System.load("C:\\opencv\\build\\bin\\opencv_ffmpeg401_64.dll");
pathopencv = "rtsp://admin:[email protected]:554/Streaming/Channels/101/";
System.out.println("pathopencv +++"+pathopencv);
launch(args);
}}
And i set native library project properties>>run>>VM options is -Djava.library.path="C:\opencv\build\java\x64"
Anything wrong! thank you sir for suggestion