send strings from a text file to an arduino thanks to processing

hello!
i'm currently trying to program an XY plotter on my own but I'm still a beginner, so i currently can make it move, it can understand lines of gcode but since the arduino can't use a file on the pc, i need to use another software to open and transmit my gcode to the arduino. And here is the problem, i can't make it work, i've found a code on the Internet for Processing IDE and i adapted it but it won't work... Given that i absolutely don't know how to use Processing, i guess my modifications were wrong but i can't figure out where i've screwed things up.. could anyone help me out?

essaiprocessing.pde (1.46 KB)

Is the code you share supposed to run on Processing or Arduino? That code is for Processing, it has got nothing to do with Arduino. I don't really understand what you want to do, but you also haven't included a single comment concerning the modifications you mention in your post.
Can you be more specific as to what you want to achieve with the Arduino?

You could try Gcodesender from GcodeCommunications - Open Source Ecology