If you have questions about the contents of this document, ask them in the forum.
Let's try the easy route first:
Install Java 8
Install Apache Ant, using their instructions.
Clone the processing git repository.
When building for the first time on Windows and Linux, you'll need to have an internet connection, because additional files need to be downloaded.
In Processing 3, examples are not included in the build by default. You'll have to clone processing-docs alongside processing to build processing with examples.
Open a terminal/console/command prompt, change to the directory where you cloned Processing, and type:
cd build ant run
With any luck, there will be all sorts of console spew for a few moments, followed by a Processing window showing up. Hooray!
To get the latest updates, just run
git pull from the command line (or GUI client) and repeat the two lines above.
Oh well, here are more details for what may have gone wrong.
workfolder. On OS X, that's build/macosx/work, on Windows, it's build/windows/work, and so on. When larger changes occur, sometimes an old work directory can cause problems.
Make sure that
java is available. From any terminal/console/command prompt, and type
java and see what happens. If it says something like
command not found, then it may be the case that
javacommand is not in your system's PATH.
Make sure that
ant is available. Do the same steps as with
When running ant, the warnings about
JAVA_HOME not being set can be ignored. It's not necessary to set
JAVA_HOME to build Processing. (Before Processing 2.1, it was necessary. No longer.)
You may want to start fresh every once in a while by typing
ant clean. Then
ant build or
ant run to do a new build from scratch.
If you're using Git 1.9 or above, you can optionally “shallow clone” repositories using git's
--depth option. The download size is reduced to ~50 MB (instead of the full 1.5 GB for the main repo). See this link for more.
git clone https://github.com/processing/processing.git --depth 1
Remember that the above command will fetch the history of just the latest commit instead of all the commits. A shallow clone is helpful if you're planning to submit a quick patch. Git 1.9 is relatively new, so you'll probably need to update your git installation before using this option.
Happily, each of the platforms we support is different. That means we do extra work to make things work everywhere.
<property name="jdk.update.macosx" value="67" />
That means it'll go looking for JDK 7u67 on your system. You can change that value to something higher than 67 (or lower, as long as it's higher than 40), if that's what you're using. Keep in mind that there may be incompatibilities.
antto the PATH and installing the right 32-bit or 64-bit Java that will work from the Command Prompt or whatever shell you're using. See above.
Disclaimer: Processing is intended to be built with ant from the command line. Using Eclipse isn't fully supported and may break from time-to-time. You should always ensure the code compiles with ant before submitting a pull request.
Open Eclipse, select File → Import... Expand the “Git” folder, select “Projects from Git”, and hit the Next button.
On the “Select Repository Source” screen, choose “URI” and enter https://github.com/processing/processing.git And then click Next.
Select “Import existing projects” on the “Wizard for project import” page. Hit Next.
Select all the projects shown and finish the wizard.
You'll have several errors, because you need to build the projects once with ant (on the command line: cd /path/to/processing/build && ant) so that the “generated” folder is created. After doing that, select the processing-app project in Eclipse and hit F5 to refresh it.
Use Run as Application to start processing/app/Base.java, and you should be in business.
You'll need to set an ANDROID_LIB classpath variable (Preferences → Java → Build Path → Classpath Variables), that points at the android.jar file for SDK 10. i.e. /path/to/android-sdk/platforms/android-10/android.jar
For bonus points, you can also set
processing/build/formatter.xml as the code formatter for your workspace.
Be sure to the execution environment is set to Java 1.6, since that's what's used for the PDE. Java 7 code is used inside appbundler, but for the moment, nowhere else.
Make sure your working directory is set to
processing/build/<platform>/work if you want to run Processing from Eclipse for debugging.