How does Processing Export work?

Below is boilerplate code for using Processing source code in IntelliJ (available on web). To put the code back into Processing you would take size() from settings() and use setup() and draw() as is. This will work for a very simple app, but not sure how well it would work for a complicated project.

import processing.core.PApplet;

public class Main extends PApplet {
    // The argument passed to main must match the class name
    public static void main(String[] args) {

    // method used only for setting the size of the window
    public void settings(){
        size(400, 400);

    // identical use to setup in Processing IDE except for size()
    public void setup(){

    // identical use to draw in Processing IDE
    public void draw(){

Getting an executable jar from IntelliJ is not easy according to this reference: . I’m still trying to figure this out myself; wish I could be of more help.