Using java code in processing

So I just paste it in then press play. I’m guessing. When I did the java file had an error.