I’ve got a sketch pulled from here:
import processing.opengl.*;
float a;
void setup() {
size(800, 600, OPENGL);
fill(0, 153);
noStroke();
}
void draw() {
background(255);
translate(width/2, height/2);
rotateX(a);
rotateY(a*2);
rect(-200, -200, 400, 400);
rotateX(PI/2);
rect(-200, -200, 400, 400);
a += 0.01;
}
When I run this sketch from the Processing IDE it works fine. Trying to run it from the command-line, less so:
$ /home/blt/projects/processing-1.2.1/java/bin/java -classpath "/home/blt/projects/processing-1.2.1/java/lib/rt.jar:/home/blt/projects/processing-1.2.1/java/lib/tools.jar:/home/blt/projects/processing-1.2.1/lib/antlr.jar:/home/blt/projects/processing-1.2.1/lib/core.jar:/home/blt/projects/processing-1.2.1/lib/ecj.jar:/home/blt/projects/processing-1.2.1/lib/jna.jar:/home/blt/projects/processing-1.2.1/lib/pde.jar:/home/blt/projects/processing-1.2.1/libraries/opengl/library/opengl.jar:/home/blt/projects/processing-1.2.1/libraries/opengl/library/jogl.jar:/home/blt/projects/processing-1.2.1/libraries/opengl/library/gluegen-rt.jar" processing.app.Commander --sketch="/home/blt/sketchbook/sketch_mar18a/" --output="/home/blt/sketchbook/sketch_mar18a/output" --run
Exception in thread "main" java.lang.NullPointerException
at processing.app.Sketch.preprocess(Sketch.java:1381)
at processing.app.Sketch.preprocess(Sketch.java:1205)
at processing.app.Sketch.build(Sketch.java:1568)
at processing.app.Commander.<init>(Commander.java:206)
at processing.app.Commander.main(Commander.java:97)
Please note that at the end of the classpath there I’ve included all of the jars mentioned in libraries/opengl/library/export.txt. What am I missing?
This is a bug.