| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Warning
This page is archived. For build instructions about Processing 4.4.0 and later, see the BUILD.md file.
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
Clone the source repository from Github.
git clone https://github.com/processing/processing.git
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 do ant run from inside the build folder as shown above.
Oh well, here are more details for what may have gone wrong:
No internet connection? – 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.
Remove the work folder - If it was working in the past, try removing the work folder. 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.
Try cleaning your build - Similarly, using ant clean will fix many of the weirdest build errors. In fact, you may want to start fresh every once in a while by typing ant clean. Then ant run will do a new build from scratch.
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
Make sure that ant is available. Do the same steps as with java, above.
Are you behind a proxy? If you are working in a proxy environment use ant run -autoproxy.
When running ant, the warnings about unable to locate tools.jar and mentions of 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.)
The build process on Windows and Linux will download its own JRE from Oracle so that it's using the correct/tested version. We only support one version of Java for each release. This helps minimize the already ridiculous number of variables we already have to test against.
In Processing 3, examples are not included in the build by default. You'll have to clone processing-docs alongside the processing folder if you want to use the examples.
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
The above command will fetch the history of just the latest commit instead of all the commits of the last 14 years. 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. Who doesn't love a puzzle?
<property name="jdk.version" value="8" /> <property name="jdk.update" value="51" /> <property name="jdk.build" value="16" />
That means it'll go looking for JDK 8u51 on your system. You can change that value to something higher than 51, if that's what you're using. Keep in mind that there may be incompatibilities. I'll leave the jdk.build entry as a little puzzle to figure out on your own for those determined to use their own JDK. (If you use the latest JDK 8u60, smoothing in FX2D is switched off. See https://github.com/processing/processing/issues/3795)
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.
When building the Android project, you'll also 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. This is an incomplete implementation of the style guidelines, but it's a start. (Anyone want to help fix this?)
Be sure the Eclipse execution environment is set to Java 1.8, since that's what's used for the PDE.
Make sure your working directory is set to processing/build/<platform>/work if you want to run Processing from Eclipse for debugging.
| Back | FazBrowse Home | New Git URL |