使用 IntelliJ 设置 Scala [英] Setting up scala with IntelliJ
问题描述
我有 Intellij Ultimate 11.1,并安装了 Scala 插件.
I have Intellij ultimate 11.1, with the scala plugin installed.
我使用 homebrew 安装了 Scala 2.9.2,它把 Scala 放入了:
I installed scala 2.9.2 using homebrew, which put scala in:
/usr/local/Cellar/scala/2.9.2>
>which scala
/usr/local/bin/scala
>scala -version
Scala code runner version 2.9.2 -- Copyright 2002-2011, LAMP/EPFL
创建一个新的java模块项目,我明白了:
Creating a new java module project, I get this:
有人能帮我解决这些问题吗,为什么 scala 插件没有让这个工作开箱即用?:)
Can someone help me fix these issues, why didn't the scala plugin make this work out of the box? :)
推荐答案
您需要在第一个屏幕截图上指定 /usr/local/Cellar/scala/2.9.2/libexec
目录.这是 Mac brew
特定的,同样的情况适用于通过 brew
安装的 grails
.
You need to specify /usr/local/Cellar/scala/2.9.2/libexec
directory on your first screenshot. This is Mac brew
specific, the same case is valid for grails
installed via brew
.
标准 Scala 发行版下载有不同的布局,IDEA 可以正确理解, brew
正在创建 libexec
目录,在其中写入 IDEA 期望的 /lib
和 /src
目录.
Standard Scala distribution download has different layout which IDEA understands correctly, brew
is creating libexec
directory where it writes /lib
and /src
directories expected by IDEA.
这篇关于使用 IntelliJ 设置 Scala的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!