This page explains how to prepare your Mac environment to use Eclipse with Processing and JUnit. These first
steps are common to all environments:
- Download and install eclipse.
- As you did in lab, create a new Java project (maybe even named
- Right-click on the
src folder and choose “Build Path” → “Configure build
Up to this point, the directions for Mac, Unix and Windows have all been the same. However, if you are using a
Mac, at this point we need to do a little bit of extra work to make it so that Eclipse will be able to find the files
it needs in order to use Processing code.
- Open your finder window, and then click on Applications (assuming this is where you installed Processing in
the first place).
- Find Processing in the listing, but instead of clicking on the icon, right-click and choose “Show
- You will now find yourself in a folder called “Processing” inside of which is a folder called
“Contents”. Copy this “Contents” folder to a location other than your Applications folder.
- I recommend you put the copy in the same location you save your cs108 labs/homeworks so you will easily be
able to find it.
- It is probably a good idea to rename the “Contents” folder to something more descriptive so you
will know what it is -- maybe “ProcessingContents”
At this point, you are now ready to return to Eclipse and add the external jar files to your build path:
- If your configure build path window is not still up, again choose your “src” folder, right-click
on the folder and choose “Build Path” → “Configure build path...”
- Along the top tabs, choose “Libraries”, and then along the right side “Add External
JARs...”. In the chooser window that opens, browse to where you saved the “ProcessingContents”
folder, and then within that, “Resources” → “Java” → “core.jar”. After
selecting “core.jar”, click “Open”.
- Still on the “Libraries” tab, now choose “Add Library...” from the right side. In the
chooser window that appears, select “JUnit”. Click “Next >”. Select “JUnit 4” as
the version from the drop-down menu and then click “Finish”.
Eclipse should now be set on your Mac so that you will be able to import processing code, and run JUnit tests.