Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup Intellij for Scala 2.10

  • First I installed macports

  • Then I installed Scala and Play through macports: To make sure installation works I run a "hello world" on eclipse. It works!

  • But since my objective is to use Intellij, I try to follow the instructions at http://confluence.jetbrains.com/display/SCA/Getting+Started+with+IntelliJ+IDEA+Scala+Plugin

  • On step 3 of the instructions (section Creating a Project), under use scala distribution, I am not sure what to type. Will someone please tell me what to type? I am using mac os x mountain lion. I don't know the path to my scala installation.

I appreciate the help. I have already looked at Intellij Idea setup for Scala, clarification needed. No help there. My Intellij version is 12.0.3 and my scala install is 2.10.

like image 866
learner Avatar asked Feb 11 '13 17:02

learner


2 Answers

Just for clarification: you can install scala in Mac OS X using Homebrew as @JasonG mentions:

$ brew install scala --with-docs

In that case, the selected solution won't work, as IntelliJ will still complain. Any way, as stated in the caveats of the formula, you will have a directory specially crafted for IntelliJ integration:

==> Caveats To use with IntelliJ, set the Scala home to: /usr/local/opt/scala/idea

Using this directory will make IntelliJ happy.

UPDATE for IntelliJ IDEA 13.x users: This doesn't seem to be needed any more. Just use SBT based projects, and everything will be downloaded and configured automatically (Scala compiler and libraries)

like image 92
José González Avatar answered Sep 28 '22 04:09

José González


You're much better served by letting existing tools do this sort of thing for you.

Define your project using SBT. Use PaulP's (Paul Phillips) SBT launcher and the sbt-idea plug-in that provides automatic generation of IDEA project and module files.

See my previous answer for some details

like image 37
Randall Schulz Avatar answered Sep 28 '22 04:09

Randall Schulz