Installing MASON on NetBeans

Surprisingly Easy! No Ant scripts, no muss, no fuss.

  1. If you are running Windows or UNIX (but not Mac OS X, which has it already), install Java3D on your system. See the MASON website for pointers on where to get Java3D.

  2. Go to the MASON website and download the latest MASON distribution (mason.tar.gz or and the libraries package (libraries.tar.gz or

  3. Unpack these two packages into their respective mason and libraries directories. Place them in a directory somewhere. Let's call that directory netbeans:

  4. Fire up Netbeans. Choose New Project... (on the Mac, it's under the File menu), and select a Java Project with Existing Sources as shown here:

  5. Click Next >. Call the project MASON. Specify the project folder to be a new folder in the same diretory as the mason and libraries folders (I called it masonproj to distinguish from the existing mason folder):

  6. Click Next >. Add the mason folder as a Source Package Folder:

  7. Click Finish. You'll be presented with the following unnecessary message below, because NetBeans isn't the brightest:

  8. Click Delete. NetBeans will finish silently with no hints as to what it's doing. That's fine. Now choose Open Project... (on the Mac, it's under the File menu), and select the masonproj folder:

  9. Click Open Project Folder. NetBeans opens the project to a blank window like this:

  10. Click on the disclosure button (on the Mac, it's the little gray triangle) to expand the MASON hierarchy:

  11. Right-click (on the Mac, control-click) on the Libraries item, popping up the following menu:

  12. Choose Add JAR/folder... repeatedly, adding all the .jar files in the libraries folder. If you're on a Mac, remember to include the jar file in the libraries/MacOSXOnly folder for good measure. After you've done this, If you click on the Libraries hierarchy disclosure button, here's what you'll see:

  13. Right-click (on the Mac, control-click) on the MASON item, popping up the following menu:

  14. Choose Properties, popping up the following window. In it, click on Run and set the Main Class to sim.display.Console as shown. Also, for good measure, increase the maximum Java heap size (to, say, 300 megs) by including -Xmx300m in the VM Options. This allows you to run memory-intensive Java3D MASON examples such as Particles3D. It's not necessary for more typical simulations.

  15. Click OK, and you're done. Now try building and running MASON: choose Run Main Project (on the Mac, it's under the Run menu), and MASON should compile and its start screen will pop up: