Error to compile a P3D sketch with Processing 3 and IntelliJ IDEA

Hi everyone, I am actually working on to switch to IntelliJ IDEA, things are working and compiling for a simple Sketch, but if I want turn this sketch to a P3D one, I have this error.

I checked around the forum to find similar issues, and checked if I had everything imported, looks like everything is in order.

So here is the code of my main class :

import processing.core.PApplet;
import processing.core.PImage;
import processing.core.PConstants;

public class Main extends PApplet{

    PImage img;

    public void settings(){
        size(512, 512, PConstants.P3D);

    public void setup() {
        img = loadImage("image.jpg");

    public void draw(){
        image(img, 0 , 0);

    public static void main(String[] args)
        String[] processingArgs = { "Main" };
        Main main = new Main();
        PApplet.runSketch(processingArgs, main);

So if someone knows how to solve this issue it would be really helpful. Thanks.

Just fix it by switching from Processing 3 to 4, I am pretty sure I will have to face more issues later on. But soon or later will had to make the switch anyway.