Installing MASON on NetBeans
Surprisingly Easy! No Ant scripts, no muss, no fuss.
- 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.
- Go to the MASON website and download the latest MASON distribution (mason.tar.gz or mason.zip) and the libraries package (libraries.tar.gz or libraries.zip).
- Unpack these two packages into their respective mason and libraries directories. Place them in a directory somewhere. Let's call that directory netbeans:
- 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:
- 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):
- Click Next >. Add the mason folder as a Source Package Folder:
- Click Finish. You'll be presented with the following unnecessary message below, because NetBeans isn't the brightest:
- 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:
- Click Open Project Folder. NetBeans opens the project to a blank window like this:
- Click on the disclosure button (on the Mac, it's the little gray triangle) to expand the MASON hierarchy:
- Right-click (on the Mac, control-click) on the Libraries item, popping up the following menu:
- 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:
- Right-click (on the Mac, control-click) on the MASON item, popping up the following menu:
- 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.
- 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: