We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hey there,
I'm experiencing some strange issues and would like to ask if anybody else has this: Since Processing 3 I can't run any PApplet from Eclipse anymore (no additional plug-ins, just following Daniel Shiffmans Tutorial). I already tried to manually add the run configuration, but this doesn't work neither.
I should add that it still works if I import the Processing 2 core.jar.
Answers
It took me a while to do this as well. Link to Processing 3 core.jar and in Eclipse run as Java application.
The reason is that PApplet no longer inherits from java.awt.Applet, a windowed component.
Moved to last post
Ah, I should probably have read the release notes. And btw this is way better than before! Thanks
That's messier than necessary; you only need to add this:
static public void main(String[] args) { PApplet.main("YourSketchName"); }
Or if you want to be tricky (and have Eclipse refactoring work if you rename the sketch)
static public void main(String[] args) { PApplet.main(YourSketchName.class.getName()); }
The easiest way to move to Eclipse is to use Export to Application and look at the Java file(s) it creates. (In that version you'll also see other things that happen behind the scenes, like how 'args' are preserved if those are used in your sketch.)
And for what it's worth, everything described here hasn't changed at all between 2.0 and 3.0.