Could not run the sketch.( Target VM failed to initialize)

Hi. I am getting this error message every time I run a code. I put jpg file in the sketch file folder in ‘data’ folder, and already tried several times. Here is a code:
PImage img;

void setup() {
size(640, 360);
img = loadImage(“rock.jpg”);

void draw() {
for (int x = 0; x < img.width; x++) {
for (int y = 0; y < img.height; y++ ) {
int loc = x + yimg.width;
float r,g,b;
r = red (img.pixels[loc]);
float maxdist = 50;
float d = dist(x, y, mouseX, mouseY);
float adjustbrightness = 255
r += adjustbrightness;
r = constrain(r, 0, 255);
color c = color®;
pixels[y*width + x] = c;

-a- please post your code into the
</> Preformatted text from the editor menu
yours is too much damaged to run.

-b- after some repair and use a

  img = loadImage("moonwalk.jpg");

from the examples your code works, where you get it from?

-c- can you run any sketch from the examples?