processing/processing — pull request #2269 by gohai (2013-12-17 08:21:16+00:00)
Title: Appbundler: Add Contents/Java to java.library.path for loadLibrary to find .jnilib files

Upon including processing.serial.*, the java.library.path of the sketch - when compiled normally - gets expanded to include the location of the specific library subfolder. For exported sketches on MacOS, java.library.path points just to Contents/MacOS inside the application, which causes loadLibrary inside custom libraries to fail. Since those library files (*.jnilib) get copied into Contents/Java, change the java.library.path to include this location as well.

Somewhat confident that this shouldn't break things, but this is touching core infrastructure.