- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Windows Mini-Guide
Created by admin on 2008-09-25.
Updated: 2008-09-29, 10:46
This is a short installation guide for Windows users who would like to try out Scala, but have no prior experience with command-line tools. Just follow the steps below to install Scala on your computer and to try its interpreter (Windows XP is assumed in this guide).
If you would prefer not to deal with the command line interpreter, or if you want to write more substantial programs, you can use instead the graphical interfaces offered by any of the Eclipse, IntelliJ IDEA, or NetBeans IDEs.
Installing Scala and Trying the Interpreter on Windows
First of all, open your Internet browser, and get to the home page of scala-lang.org:
From the menus, select 'Download Scala', under 'Software', or click on the 'Download Scala' link on the right, under 'Scala Quick Links'.
You will see on the download page, a number of links. Select, from the 'Current Stable Release' list, the file that ends in '.zip', by clicking on the link.
You will see a dialog like the following. Click on 'Save':
When you see this dialog box, click on 'My Documents', and then on 'Save':
You will see the file being downloaded to your computer. When you see 'Download Complete', click on 'Close'. This message box may also close automatically on its own. Once that is done, close your Internet browser.
Now select, from the Start menu, the folder 'My Documents', as shown below:
In the window that appears, look for the file that has just been downloaded. Click with the right mouse button on it, and select 'Extract All...':
You will see the following dialog. Click on 'Next':
When you see the following, click on 'Next' again:
Then click on 'Finish':
The Scala distribution has been installed on your computer. Now it's time to start the command line interpreter, and try out Scala. Open 'Command Prompt' from the Start Menu:
You should see the following window:
It is now just a matter of setting up the Scala interpreter, and starting it. Just type the following commands (adapting the version number to the version that you just downloaded):
cd "My Documents\scala-2.7.1.final" set PATH=%PATH%;scala-2.7.1.final\bin scala
as shown below:
You can now use the Scala interpreter. When you are done, just type 'exit' to close the Scala interpreter, and 'exit' again to close the command prompt window.
If you wish to set permanently the PATH environment variable, so that you can just type "scala" in the Command Prompt to get to the interpreter at any time, please follow this guide. For the example above, you will need to add the following at the beginning:
%HOMEDRIVE%%HOMEPATH%\My Documents\scala-2.7.1.final\scala-2.7.1.final\bin;
For further information on using Scala, please refer to our Documentation Pages; for more information on the Windows Command Prompt, just use your favorite Internet search engine, like Google or Yahoo, to find out more.