'Processing ERROR:Target VM failed to initialize

can anyone help? Another error... I just want to use my computer camera, but it didn't work. anyone have any ideas? Thanks a lot :)

my code:

import processing.video.*;

Capture cam;

void setup()
{
  size(640,480);
  
  String[] cameras = Capture.list();
  
  println("ac");
  for(int i =0;i<cameras.length;i++)
  {
    println(i+":"+cameras[i]);
  }
  
  cam = new Capture(this,cameras[0]);
  cam.start();
}

Error : Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help → Troubleshooting.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source