C:> scala
Welcome to Scala version 2.10.7 (OpenJDK Client VM, Java 1.8.0_41).
Type in expressions to have them evaluated.
Type :help for more information.
scala>
scala> :quit
C:>
Code language:plaintext(plaintext)
JDK 14 + Scala 2.13.2
使いませんでしたが、メモとして残しておきます。
筆者はOpenJDK 14を使いました。
https://jdk.java.net/ から、Ready for use: JDK 14をクリック、Windows/x64 zipをクリックして、ダウンロードします。zipファイルを展開します。C:\jdk\jdk-14.0.1 となるように、コピーまたは移動します。
/usr/local/Cellar/scala@2.11/2.11.12 (51 files, 31.3MB)
Built from source on 2020-06-19 at 01:23:29
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/scala@2.11.rb
==> Requirements
Required: java = 1.8 ✔
==> Caveats
scala@2.11 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have scala@2.11 first in your PATH run:
echo'export PATH="/usr/local/opt/scala@2.11/bin:$PATH"' >> /Users/aoki.makoto/.bash_profile
==> Analytics
install: 544 (30 days), 1,610 (90 days), 6,977 (365 days)
install-on-request: 548 (30 days), 1,616 (90 days), 6,987 (365 days)
build-error: 0 (30 days)
Code language:Bash(bash)
$ brew install scala@2.11
(省略)
==> Downloading https://downloads.lightbend.com/scala/2.11.12/scala-2.11.12.tgz
######################################################################## 100.0%
==> Caveats
scala@2.11 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have scala@2.11 first in your PATH run:
echo'export PATH="/usr/local/opt/scala@2.11/bin:$PATH"' >> /Users/aoki.makoto/.bash_profile
==> Summary
🍺 /usr/local/Cellar/scala@2.11/2.11.12: 51 files, 31.3MB, built in 2 seconds
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/scala.rb
==> Dependencies
Required: openjdk ✘
==> Caveats
To use with IntelliJ, set the Scala home to:
/usr/local/opt/scala/idea
==> Analytics
install: 8,689 (30 days), 32,960 (90 days), 130,169 (365 days)
install-on-request: 8,165 (30 days), 30,586 (90 days), 120,663 (365 days)
build-error: 0 (30 days)
Code language:Bash(bash)
$ brew install scala
==> Downloading https://homebrew.bintray.com/bottles/openjdk-13.0.2%2B8_2.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/65/65adca036393f528e3830cab8b0aafec94be870de087d94cfe098fd593517307?__gda__=exp=1592213639~hmac=f6d6d606033e8fe94407ea29e3ae65233920d
######################################################################## 100.0%
==> Downloading https://downloads.lightbend.com/scala/2.13.2/scala-2.13.2.tgz
######################################################################## 100.0%
==> Installing dependencies for scala: openjdk
==> Installing scala dependency: openjdk
==> Pouring openjdk-13.0.2+8_2.catalina.bottle.tar.gz
==> Caveats
For the system Java wrappers to find this JDK, symlink it with
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
openjdk is keg-only, which means it was not symlinked into /usr/local,
because it shadows the macOS `java` wrapper.
If you need to have openjdk first in your PATH run:
echo'export PATH="/usr/local/opt/openjdk/bin:$PATH"' >> /Users/aoki.makoto/.bash_profile
For compilers to find openjdk you may need to set:
export CPPFLAGS="-I/usr/local/opt/openjdk/include"
==> Summary
🍺 /usr/local/Cellar/openjdk/13.0.2+8_2: 631 files, 314.6MB
==> Installing scala
==> Caveats
To use with IntelliJ, set the Scala home to:
/usr/local/opt/scala/idea
==> Summary
🍺 /usr/local/Cellar/scala/2.13.2: 41 files, 22.5MB, built in 2 seconds
==> Caveats
==> openjdk
For the system Java wrappers to find this JDK, symlink it with
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
openjdk is keg-only, which means it was not symlinked into /usr/local,
because it shadows the macOS `java` wrapper.
If you need to have openjdk first in your PATH run:
echo'export PATH="/usr/local/opt/openjdk/bin:$PATH"' >> /Users/aoki.makoto/.bash_profile
For compilers to find openjdk you may need to set:
export CPPFLAGS="-I/usr/local/opt/openjdk/include"
==> scala
To use with IntelliJ, set the Scala home to:
/usr/local/opt/scala/idea
$ scala
Welcome to Scala version 2.10.7 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_251).
Type in expressions to have them evaluated.
Type :helpfor more information.
scala>
scala> :quit
$
$ scala
Welcome to Scala 2.11.12 (OpenJDK 64-Bit Server VM, Java 11.0.7).
Type in expressions for evaluation. Or try :help.
scala>
Code language:Bash(bash)
ヘルプは「:help」です。
scala> :help
All commands can be abbreviated, e.g., :he instead of :help.
:help [command] print this summary or command-specific help
:completions <string> output completions for the given string
:imports [name name ...] show import history, identifying sources of names
:implicits [-v] show the implicits in scope
:javap <path|class> disassemble a file or class name
:line <id>|<line> place line(s) at the end of history
:load <path> interpret lines in a file
:paste [-raw] [path] enter paste mode or paste a file
:power enable power user mode
:quit exit the interpreter
:replay [options] reset the repl and replay all previous commands
:require <path> add a jar to the classpath
:reset [options] reset the repl to its initial state, forgetting all session entries
:save <path> save replayable session to a file
:sh <commandline> run a shell command (result is implicitly => List[String])
:settings <options> update compiler options, if possible; see reset
:silent disable/enable automatic printing of results
:type [-v] <expr> display the type of an expression without evaluating it
:kind [-v] <type> display the kind of a type. see also :help kind
:warnings show the suppressed warnings from the most recent line which had any