This page explains how to prepare your Mac environment to use Eclipse with Processing and JUnit. These first steps are common to all environments:

  1. Download and install eclipse.
  2. As you did in lab, create a new Java project (maybe even named processing)
  3. Right-click on the src folder and choose “Build Path” → “Configure build path...”

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.

  1. Open your finder window, and then click on Applications (assuming this is where you installed Processing in the first place).
  2. Find Processing in the listing, but instead of clicking on the icon, right-click and choose “Show Package Contents”
  3. 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.

At this point, you are now ready to return to Eclipse and add the external jar files to your build path:

  1. 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...”
  2. 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”.
  3. 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.