|
1 | 1 | ---
|
2 |
| -title: Dotty |
| 2 | +title: Scala 3 |
3 | 3 | layout: main
|
4 | 4 | hasFrame: false
|
5 | 5 | extraCSS:
|
@@ -58,18 +58,29 @@ <h1 id="dotty" class="above-byline">Scala 3</h1>
|
58 | 58 | <div class="container">
|
59 | 59 |
|
60 | 60 | <h1 id="getting-started">Try Scala 3</h1>
|
61 |
| - <p>If you are a Mac user, you can install Scala 3 with <a href="https://brew.sh/">brew</a>:</p> |
| 61 | + <p>There are multiple ways of <a href="https://docs.scala-lang.org/scala3/getting-started.html">getting started</a> with Scala 3.</p> |
| 62 | + <ol> |
| 63 | + <li>You can try Scala 3 in your browser with <a href="https://scastie.scala-lang.org/?target=dotty">Scastie</a>.</li> |
| 64 | + <li>If you already have sbt installed, you can <a href="#getting-started-with-a-project">create a Scala 3 project</a> and sbt will take care of the rest.</li> |
| 65 | + <li>You can install all necessary dependencies with <a href="https://get-coursier.io/">coursier</a> by running <code>cs setup</code>. You can also run <code>cs install scala3-compiler</code> or <code>cs install scala3-repl</code> to install command-line commands for the compiler and repl, correspondingly.</li> |
| 66 | + <li>You can <a href="#install">manually install Scala 3</a> on your computer.</li> |
| 67 | + </ol> |
| 68 | + |
| 69 | + <h1 id="install">Install Scala 3</h1> |
| 70 | + <p>If you are a <strong>Mac</strong> user, you can install Scala 3 with <a href="https://brew.sh/">brew</a>:</p> |
62 | 71 | <pre><code>brew install lampepfl/brew/dotty</code></pre>
|
63 | 72 |
|
64 |
| - <p>If you are a Linux or Windows user, download the <a href="https://github.com/lampepfl/dotty/releases">latest release</a>. Optionally add path of the folder <code>bin/</code> to the system environment variable <code>PATH</code>. </p> |
| 73 | + <p> |
| 74 | + If you are a <strong>Linux</strong> or <strong>Windows</strong> user, as a prerequisite you need a JDK 8 or later properly installed on your system. The environment variable <code>JAVA_HOME</code> should point to your Java installation.<br/> |
| 75 | + For <strong>Windows</strong> users, we recommend using <a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10">the Windows subsystem for linux</a> or some other bash shell like <a href="https://gitforwindows.org/">git bash</a>.<br/> |
| 76 | + Then download the <a href="https://github.com/lampepfl/dotty/releases">latest release</a>. Optionally add the path of the folder <code>bin/</code> to the system environment variable <code>PATH</code>. |
| 77 | + </p> |
65 | 78 |
|
66 | 79 | <p>Now you can compile Scala source code:</p>
|
67 | 80 | <pre><code>scalac hello.scala</code></pre>
|
68 | 81 |
|
69 | 82 | <p>To start the REPL, run: <code>scala</code>.</p>
|
70 | 83 |
|
71 |
| - <p>Or, you can try Scala 3 in your browser with <a href="https://scastie.scala-lang.org/?target=dotty">Scastie</a>.</p> |
72 |
| - |
73 | 84 | <h1 id="getting-started-with-a-project">Create a Scala 3 Project</h1>
|
74 | 85 | <p>The fastest way to create a new project in Scala 3 is using <a href="http://www.scala-sbt.org/">sbt (1.1.4+)</a>.</p>
|
75 | 86 |
|
|
0 commit comments