Question

Edit:
Got it sorted, SCALA_HOME + /bin to PATH sets the default interpreter; i.e. typing "scala" from bash prompt invokes 2.9.1 in my case. Just downloaded 2.10.0.M1. Invoking /path/to/2.10/bin/scala from bash brings up 2.10 REPL.

I'll just add a terminal alias for 2.10 so I don't have to type out the path manually.

Original:
Do I need a guest VM to pull this off, or in Linux, can I somehow run 2.10 and 2.9 side-by-side?

Basically, I'd like to experiment with 2.10-M1 reflection and see what runtime havoc I can wreak on case classes while continuing with general 2.9.1 development.

If not, a Kotlin-esque web demo sure would be nice to mess around with during the 2.10 evolution...

Was it helpful?

Solution

There is no problem at all with installing multiple versions of Scala; just install them in two different directories. Make sure you call the right version of scalac, scala and other executables when you want to use a specific version.

Scala does not require any system-wide settings that prevent you from having more than one version on your computer at once.

OTHER TIPS

They will co-exist just fine. Remember that scala is really just a thin wrapper around Java from a runtime perspective. That is:

  • you can run compiled scala using the standard $JAVA_HOME/bin/java as long as scala-library.jar is on the classpath
  • the REPL is contained within a scala distribution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top