- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Permanently Setting PATH on Windows
Created by admin on 2008-09-29.
Updated: 2008-09-29, 10:51
After unpacking the Scala distribution on Windows, you may find yourself having to set the PATH environment variable every time you open a new Command Prompt. The instructions below will explain how to set PATH permanently. Please note that you will only be able to change PATH in this manner if your Windows account has administrator rights.
Warning: editing environment variables may impair the operation of your machine, if done without care. Please proceed with caution.
Setting the Environment PATH to the Scala Distribution
To begin, open the Control Panel from the Start Menu:
Start Menu
You will see the window below. Double click on "System""
Control Panel
From the available tabs, select "Advanced", and click on the "Environment Variables" button:
System - Advanced Tab
In the lower part of the window that appears, search for "PATH", and click on the "Edit" button that is below the list. this will only work if you have an administrator account; if your account is restricted, however, the "Edit" button will be disabled and you will not be able to follow the procedure described on this page.
Environment Variables
You will see the following window appear:
Editing PATH
Just insert at the beginning of the "Variable value" line the full path to your Scala installation, followed by a semicolon. For instance:
%HOMEDRIVE%%HOMEPATH%\scala-2.7.1.final\bin;[previous line content]
will expand to C:\Documents and Settings\[username]\scala-2.7.1.final\bin;[old path]. Once that is done, click on "OK" to close "Edit System Variable", then "OK" again to close "Environment Variables", then "OK" once more to close "System Properties".
From this moment on, every time you open the Command Prompt you will be able to type just "scala" to get to the Scala interpreter.