Using UACalc with Eclipse
Seting up Eclipse for use with UACalc
Eclipse
is a powerful Integrated Development Environment (IDE) which
makes it easy (well easier) to add your own programs to UACalc.
William DeMeo has written nice instructions on how to set this up.
- A long but very good tutorial on Eclipse.
Eclipse Setup Directions
Instructions for importing uacalc into Eclipse. From within
Eclipse do:
- File --> Import...
- Select from the list: CVS --> Project from CVS then click Next.
- Select: Create a new repository location. then click Next.
- Fill in the fields as follows:
- Host: uacalc.cvs.sourceforge.net
- Repository path: /cvsroot/uacalc
- User: anonymous
- Connection type: pserver
- Select "Use an existing module."
When uacalcsrc shows up, select it and click Finish.
You should see a progress dialog box showing you that uacalcsrc is being checked out of CVS. Once the checkout is complete, you will probably have errors, such as, "The project cannot be built until the build path errors are resolved." (see below) - Right-click on the name uacalcsrc, in the Package Explorer pane on the left, and select Properties.
- In the dialog box that appears, select Java Build Path, click on the Libraries tab and then click the Add Jars button.
- Expand the uacalcsrc folder, expand the jars folder, and select miglayout-3.7-swing.jar and click OK.
- On the Libraries Tab, make sure the JRE System Library [jdk1.6.0_10] does not say "(unbound)" next to it. If it does, click the Add Library button, select JRE System Library, and click the Workspace Default radio button. (This should be the JRE System Library that you normally use when compiling java programs with Eclipse.)
- Select the (unbound) JRE System Library (the one with the red x next to it), and click Remove.
- Finally, click the okay button to exit out of the Properties dialog.
- If there is still a red exclamation point next to the name uacalcsrc, try right-clicking on the name uacalcsrc and selecting Refresh.
Fixing the Build Path Errors:
- A good place to add them is the package org.uacalc.example. Right click on this package and choose New --> class.
- The class HasKaryNU, contributed by Matt Valeriote, tests in polynomial time if an idempotent algebra has a k-ary nu term for a given k. Eclipse can run these programs (right click and choose Run as .. java app). You will need to change the name of the algebra file.