To run the program:

-Put foamMain.java and the gcode file of the profile in the same folder.
-Open the console/terminal and go to that directory.
-Put this sentence and press enter:
javac -g foamMain.java
-Now change in the next sentence [wing] for the name of the gcode file in both and press enter:
java foamMain "wing.gcode" "wing.gcode"
-The Gcode will appear in the console.