To use your pro­cess­ing sketches with­out the pro­cess­ing ide, e.g. to iclude them in an auto­mated work­flow, you can export your appli­ca­tion from pro­cess­ing.

When “Export Appli­ca­tion” is selected from the “File” menu, a dia­log box opens and you can select which plat­forms you want to export to. You may also select if you want the appli­ca­tion to run full screen (in present mode). A folder will be cre­ated for each of the oper­at­ing sys­tems selected; each folder con­tains the appli­ca­tion, the source code for the sketch, and all required libraries for a spe­cific plat­form. *

Linux is just a shell script, which can prob­a­bly be used on most Unix plat­forms (there’s almost noth­ing to it) *

Linux does not mean GNU/Linux in this case, but pro­cess­ing’s Linux export option. I nor­mally copy/paste the code from the result­ing shell script to include it in big­ger scripts. Because this code is one end­less line (depend­ing on the num­ber of libraries) , I tend to restruc­ture the code. To exe­cute the scripts with­out GUI, I com­bine it the with head­less hack.

 
SKETCHNAME=isaac_1_00
 
# EXPORT DISPLAY FOR PROCESSING HEADLESS ################################ export DISPLAY=localhost:1.0 ##########################################
 
APPDIR=$(dirname "$0") SKETCH=$APPDIR/src/$SKETCHNAME/application.linux/lib/$SKETCHNAME.jar
 
CR=$APPDIR/i/lib/1050/core.jar PDF=$APPDIR/i/lib/1050/pdf.jar TXT=$APPDIR/i/lib/1050/itext.jar GMRTV=$APPDIR/i/lib/1050/geomerative.jar BTK=$APPDIR/i/lib/1050/batikfont.jar JGL=$APPDIR/i/lib/1050/jogl.jar GLGN=$APPDIR/i/lib/1050/gluegen-rt.jar JBX=$APPDIR/i/lib/1050/JBox2D-2.0.1-b250-Library.jar: JBXDS=$APPDIR/i/lib/1050/JBox2D-2.0.1-b250-Library_ds.jar: PBX=$APPDIR/i/lib/1050/pbox2d.jar: FSC=$APPDIR/i/lib/1050/fisica.jar:
 
LIBS=$SKETCH:$CR:$PDF:$TXT:$GMRTV:$BTK:$JGL:$GLGN:$JBX:$JBXDS:$PBX:$FSC
 
java -Djava.library.path="$APPDIR" \ -cp "$LIBS" \ $SKETCHNAME