Quick Start to Developing the Orc Language Toolset
Install Prerequisites
- Java SE 1.8 or later.
- Eclipse 4.7. "Eclipse IDE for Eclipse Committers" (formerly called "Eclipse Standard") is sufficient, but any Eclipse package with the JDT can be used.
- Scala IDE for Eclipse, corresponding to Scala language version 2.12.3. Note that the Scala IDE for Eclipse works better with a modified eclipse.ini.
- A Git distribution that includes the
git describe
command. Most UNIX systems (including macOS with Xcode), Linux distributions, BSD variants, and other OSes include this as part of their base platform. A few OSes, notably Windows, require one to install a Git client.
Check out Orc
Use the method of your choice to check out https://github.com/orc-lang/orc and import it into Eclipse projects. Here is how to accomplish this using EGit:
- Launch Eclipse
- Go to File -> Import...
- Open Git, choose Projects from Git, and press Next >
- Choose Clone URI and click Next >
- Enter for the URL: https://github.com/orc-lang/orc, and press Next >.
- Press Next > on the Branch Selection page.
- Choose a destination folder for the Orc git repository, and press Next >.
- Press Next > on the Select a wizard... page.
- Finally, press Finish on the Import Projects page.
Running Orc Programs: Alternative 1
Install the Orc Eclipse plug-in. In the Orc Run Configuration settings, go to Alternative Orc Runtime Engine and add build/orc-*.jar and lib/*.jar in your OrcScala project to the class path. Note that adding the Scala library (as it is represented in the OrcScala class path) will not work.
Running Orc Programs: Alternative 2
- Within Eclipse, open the Orc program you wish to run.
- Go to Run -> Run Configurations...
- Right-click Scala Application and select New
- Fill out the Main form as follows:
- Name
- Orc
- Project
- OrcScala
- Main class
- orc.Main
- Click the Arguments tab and fill out the form as follows:
- Program arguments
- "${selected_resource_loc}"
- Click Apply
You only have to perform the above steps once. Then whenever you want to run an Orc program:
- Select the program source file in Eclipse (you can open it or simply select it in the Package Explorer or Navigator).
- Go to Run -> Run ..., select Orc, and click Run (after doing this once, you can use the dropdown menu of the "run" icon in the toolbar as a shortcut).