Skip to content

Instantly share code, notes, and snippets.

@AbigailBuccaneer
Created January 30, 2012 15:02
Show Gist options
  • Save AbigailBuccaneer/1704860 to your computer and use it in GitHub Desktop.
Save AbigailBuccaneer/1704860 to your computer and use it in GitHub Desktop.
Using CSO in an Eclipse project

Using CSO in an Eclipse project

  1. If you haven't already done so, install Eclipse. You can do this from your * nix repositories, or from the Eclipse download page. The Scala IDE for Eclipse claims that either Eclipse IDE for Java Developers or Eclipse Classic will suffice.
  2. Install the Scala distribution. Once again, if possible grab this from your repositories, if not then from the Scala download page. I'd recommend the IzPack installer; it seems to work on all systems I've used it on.
  3. Install the Scala IDE for Eclipse. Head to the Scala IDE for Eclipse download page and follow the instructions to install it for Scala 2.9.x.
  4. Download and extract CSO. Head to Bernard Sufrin's CSO files and download cso.jar, and cso-sources-scala2.9.0.tgz. Choose somewhere to put them - if you're root and on * nix, /usr/share/java is a good place. Put cso.jar in there, and extract the src/ folder from the sources archive.
  5. Set up CSO as a User Library in Eclipse. In Eclipse, open the User Libraries window (Window > Preferences > Java > Build Path > User Libraries), hit 'New...' and name it CSO. Press 'Add Jars...' and choose cso.jar from where you saved it. Choose 'Source attachment' and press 'Edit...', then 'External Folder' and choose the src/ folder you extracted. Press 'OK'.
  6. Create a new Scala project: File > New > Project... > Scala Wizards > Scala Project. If possible, set the JRE version to 1.6, as the Scala IDE for Eclipse page reports "We recommend the latest 1.6.x version, there have been issues reported when using Eclipse and Java 7.".
  7. Add CSO to the project build path. Project > Properties > Java Build Path > Libraries > Add Library... > User Library > CSO > Finish

You should be ready to go! Maybe. Who knows?

@AbigailBuccaneer
Copy link
Author

(Of course, in your code you should import ox.CSO._)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment