Installing Scalatra on Windows

Scalatra is a micro framework for Scala. Installation does not seem to be as straight forward as adding Scalatra to the dependencies of build.sbt. It requires a number of other tools to work: Conscript and giter8. Conscript is a tool for installing and updating Scala code. giter8, which depends on conscript, allows you to check out project templates directly from Github. It’s the recommended way to generate Scalatra project skeletons. These are quick installation instructions for Scalatra on Windows.

  • Download the installer from Github. Download the conscript runnable jar*.
  • Open a command prompt in the directory the jar file was downloaded to.
  • Execute the following command java -jar conscript-<version number>.jar. A splash screen is displayed. Wait for the installation to finish. The splash screen will show the directory Conscript was installed to. In my case it was “c:\Users\<username>\bin”.
  • Close the splash screen.
  • Open the Windows System Properties and add the installation directory to the PATH variable.
  • Close the command prompt and reopen it. Type the command cs and hit enter. A help message should be displayed.
  • Install gitter8 with the following command cs n8han/giter8

That is the formalities out of the way, so it time to get coding with Scalatra.

* Check Github for the latest version

Leave a Reply

Your email address will not be published. Required fields are marked *