title: Java webcamera crash when detecting first frame
body: <p>Actually i am using opencv 3.0.0 when detecting first frame camera become crash in Eclipse. 
  Code look like this</p>
  
  <pre><code>public class main
  {
  static {
      System.out.println("java.library.path="+System.getProperty("java.library.path"));
  
      System.load(new File("/Desktop/opencv-3.0.0/build22/lib/libopencv_java300.dylib").getAbsolutePath());
  //  System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
      System.load(new File("/Documents/Mourish/java-proj/FaceDetector/libFaceDetector.so").getAbsolutePath());
  System.out.println("Library loaded");
  
  }
  
  public static void main(String argv[]) {
      int n = 0 ;
      final Scalar    FACE_RECT_COLOR     = new Scalar(0, 255, 0, 255);
  
      MatOfRect faces = new MatOfRect();
  //  CascadeClassifier cascadename = new CascadeClassifier("/Documents/FD/sample/lbpcascade_frontalface.xml");
  
       String s = "/Documents/FD/sample/lbpcascade_frontalface.xml";
  
       Imshow im = new Imshow("window");
      VideoCapture camera = new VideoCapture(0);
  
      if(!camera.isOpened()){
          System.out.println("Error");
      }
      else {
          Mat frame = new Mat();
          Mat out = new Mat();
          while(true){
              if (camera.read(frame)){
  
  //              
                  n = FaceDetector.sample(frame, out, faces, s);
                  System.out.println("Frame Obtained");
                  System.out.println("Captured Frame Width " + 
                  frame.width() + " Height " + frame.height());
  
  
                  Rect[] facesArray = faces.toArray();
                  for (int i = 0; i &lt; facesArray.length; i++)
                    Imgproc.rectangle(frame, facesArray[i].tl(), facesArray[i].br(), FACE_RECT_COLOR, 3);
                  im.showImage(frame);
                  Imgcodecs.imwrite("/Documents/FD/sample/camera.jpg", frame);
  
                  System.out.println("OK");
  
                  break;
              }
          }   
      }
  //  return n;
  }
  }
  </code></pre>
  
  <p>show some exception in im.showImage(). i import external jars opencv_300.jar. Exception look like this..,</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/opencv/highgui/Highgui
      at com.atul.JavaOpenCV.Imshow.showImage(Imshow.java:77)
      at main.main(main.java:61)
  Caused by: java.lang.ClassNotFoundException: org.opencv.highgui.Highgui
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.secu`enter code here`rity.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      ... 2 more
  Pls help me to find actual issue....
  </code></pre>