Loading...
Logo
Processing Forum
Hi everyone, 

Hoping someone can help. I've installed the latest copy of Processing 2.0.1 and can't get any sketch to run that uses P3D.

I can replicate the problem with this basic sketch:

void setup() {
  size(640, 640,P3D);
}

When I attempt to run this, I get the NoClassDefFoundError: processing/core/PGraphics3D output at the bottom of this message.

Sketches  not using P3D work as expected, for example:

void setup() {
  size(640, 640);
}

I'm running OSX 10.8.4, the most recent Java version 7 update 25, and Processing 2.0.1. 

I haven't been able to find a solution via the forum, but it looks like PGraphics3D isn't in processing/core/, it's in processing/opengl 

Thanks in advance!
Steve

Exception in thread "Animation Thread" java.lang.NoClassDefFoundError: processing/core/PGraphics3D
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at processing.core.PApplet.makeGraphics(PApplet.java:1800)
at processing.core.PApplet.size(PApplet.java:1656)
at processing.core.PApplet.size(PApplet.java:1627)
at Reflection_tes.setup(Reflection_tes.java:26)
at processing.core.PApplet.handleDraw(PApplet.java:2245)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:243)
at processing.core.PApplet.run(PApplet.java:2141)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.ClassNotFoundException: processing.core.PGraphics3D
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 34 more

Replies(2)

Not only P3D mode is using OpenGL, P2D is as well in Processing 2 series! Only JAVA2D is real 2D.

Seems like Processing is not recognizing your graphics 3D resources or something like that.
You should try to update your video card driver. Who knows?
I'm running OSX 10.8.4, the most recent Java version 7 update 25, and Processing 2.0.1.
Even though you have the most updated Java version installed,
Processing uses instead its own old bundled Java!

In Linux, it's enough to rename or delete its /java subfolder to force Processing to use the OS's default Java.
Perhaps that works in OSX too.

As an experiment, you may try previous Processing's stable version 1.5.1.
In that version, even P3D mode uses software rendering.
Only by explicitly using OPENGL mode you get hardware rendering there.

Moreover, its OPENGL mode uses an older version of it.
It might be more compatible than the one from newest versions.

Thanks for the lead – Processing 1.5.1 works with P3D, but Processing 2.0.1 still does not work with P3D. 

My MacBook Pro is from 2012 and has the latest OS and firmware. Other machines I've tried work fine. Is the problem likely related to a display driver or a Java configuration? 

Any help is appreciated!
Steve