Tried to use apt-cache search scala and found ubuntu could easily install scala.
But it doesn’t work on MAC. Use port search scala knew that scala in port has different version.
Must use something like port install scala-2.9
If you need to compiler the scala code, you must use scalar-2.9 which is not convenient.
Two way to change it.
First is soft link the binary scala & scalac to scala-2.9 & scalac-2.9 which is not good because if version upgraded, hard to find what you have done in your machine.
Second way is what I’ve done. Add these two line to /etc/bashrc

alias scalac='scalac-2.9'
alias scala='scala-2.9 -classpath . -Dfile.encoding=UTF8'

Auto encoding to UTF8.
This also works on java, the console could load UTF8 as default.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>