How to use Processing 3 on IntelliJ IDEA?

I up voted Kevin's answer but also went ahead and created a gradle project that you can use with or without an IDE or processing. Git Commit to processing project

Edit doesn't work for video libraries. i tried to get the libraries needed but that is not my best area and have resorted to use P3 for those projects.


It's hard to answer general "how do I do this" type questions. Stack Overflow is designed more for "I tried X, expected Y, but got Z instead" type questions. You'll have much better luck if you try something out and post an MCVE along with a specific question if you get stuck. You say you think things have changed enough so that those tutorials don't work anymore- could you test that assumption by trying it out?

Because those tutorials will still work. A few things have changed, such as the removal of the ability to embed a PApplet directly into a Swing application. But 90% of the rest of the tutorials should work fine.

Step 1: Add the Processing library to your classpath. This includes the core and any JOGL dependencies you need.

Step 2: Create a class that extends PApplet and add your code there.

Step 3: Call PApplet.main("YourSketchNameHere"); to launch your sketch.

Here is a little example that shows those steps:

import processing.core.PApplet;

public class ProcessingTest extends PApplet{

    public void settings(){
        size(200, 200);
    }

    public void draw(){
        background(0);
        ellipse(mouseX, mouseY, 20, 20);
    }

    public static void main(String... args){
        PApplet.main("ProcessingTest");
    }
}

Please try something out and post a specific question if you get stuck. Good luck.

Shameless self-promotion: I wrote a tutorial on using Processing as a Java library, available here.