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

**URL:** <https://discourse.processing.org/t/error-to-compile-a-p3d-sketch-with-processing-3-and-intellij-idea/35689>\
**Category:** Processing\
**Created:** [March 12, 2022, 4:13am UTC](https://discourse.processing.org/t/error-to-compile-a-p3d-sketch-with-processing-3-and-intellij-idea/35689 "2022-03-12T04:13:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dams2007](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/dams2007/32/7434_2.png) [@dams2007](https://discourse.processing.org/u/dams2007)\
**Post date:** [March 12, 2022, 4:13am UTC](https://discourse.processing.org/t/error-to-compile-a-p3d-sketch-with-processing-3-and-intellij-idea/35689/1 "2022-03-12T04:13:21Z")

</div>

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.

 ![Screen Shot 2022-03-12 at 1.02.08 PM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/5eda8fcee205a69451a84b6b67bf3900177d2255.png)

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

 ![Screen Shot 2022-03-12 at 1.04.48 PM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/51f834d199456d94738b283e46a05fca9c98094e.png)

So here is the code of my main class :

 ![Screen Shot 2022-03-12 at 1.14.13 PM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/8/86f52276c0d299229000a0755840e419db3664a6.jpeg)

```auto
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.

---

<div class="post-metadata">

**Author:** ![dams2007](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/dams2007/32/7434_2.png) [@dams2007](https://discourse.processing.org/u/dams2007)\
**Post date:** [March 13, 2022, 12:58am UTC](https://discourse.processing.org/t/error-to-compile-a-p3d-sketch-with-processing-3-and-intellij-idea/35689/2 "2022-03-13T00:58:11Z")

</div>

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.
