Skip to content

Processing

Command line

600px|center

Since Processing 2 has removed the "Use external editor" with a lame screw-you note and wants to force us to use a lousy text box for source code editing, I figured out how to run it from the command line. It has its drawbacks, but "fuck you, you chose Java".

On a Mac you have to run Processing.app, then select from the menu Tools - Install "processing-java". This will write a script to either your home directory or /usr/bin/processing-java.

Then you can invoke sketches from the command line like:

    processing-java --sketch=$HOME/nycr/megaPong --output=/tmp/p --force --run

Yes, you must specify the full path to the directory that contains the .pde file. Otherwise you get a cryptic "megaPong does not exist". Thanks for the helpful error, guys.

Yes, you must specify an output directory. It wants a temporary place to scribble all of its files, but can't come up with its own.

Yes, you must specify --force unless you give it a new directory each time.

And yes, you must specify --run because otherwise what would the reasonable default be.

Oh, and when the one that you have run on the command line exits, it kills any other Processing applications that might be running on that machine. You're welcome and fuck you for choosing Processing.

Software


Last update: November 8, 2020