title: Running a jar with the right version of scala
body: <p>I have a scala project that I can run with sbt. Now I want to execute it as a stand alone app. How can I run it with the scala command and ensure the right version of everything, in particular the scala-library and JVM?</p>
  
  <p>PS: Just to clarify what I mean by an example from ruby.
  I write some ruby script which I use routinely. For example, to apply updates a bit more cleanly then the OS does.</p>
  
  <p>When I wrote the script I used ruby 1.8.3. ( Making version numbers up here as an example. ) I used the command line <code>ruby my_script</code>.</p>
  
  <p>Now the version is ruby 2.0.1. The script will not run under this ruby because of language changes. So I use the command line <code>ruby1.8.3 my_script</code>.</p>
  
  <p>Or rather I embed it in the shebang line.</p>
  
  <p>Simalarly I want to run a jar using <code>scala my_jar.jar</code> but it was a built using a scala version 2.8.3 and will not run with that command. How do I make scala use the right version? </p>