Of Code and Me

Somewhere to write down all the stuff I'm going to forget and then need

How to fix the Scala interpreter on 64 bit Windows October 13, 2010

Filed under: Scala — Rupert Bates @ 2:18 pm

If you install Scala 2.8 on 64 bit Windows using the IzPack Installer and then run the interpreter it will start up and immediately close again. If you try to run the scala.bat file that launches it from a command prompt you will then see the error ‘\scala was unexpected at this time.’

This is because by default the Scala is installed in the directory C:\Program Files (x86)\scala\bin and this directory name breaks the batch script at line 19:

set _SCALA_HOME=%SCALA_HOME%

To fix it all you have to do is change this line to:

set _SCALA_HOME=”%SCALA_HOME%”

Ie. surround the %SCALA_HOME% variable with speech marks. Note that to edit this file you will need adminstrator privileges

Advertisements
 

One Response to “How to fix the Scala interpreter on 64 bit Windows”

  1. Mike Says:

    2 times today you have saved my bacon. Thanks!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s