Reputation: 45722
I entered Scala courses on Coursera and used to write Scala projects in Eclipse Indigo
. All worked well. But now I gonna to convert to my favorite IDE - Intellij IDEA.
But I can't configure it for Scala usage.
What I've already done:
SCALA_HOME
variableWhat a problem:
When I import coursera assignments, Intellij doesn't see some classes like List
, Array
etc. For example, when I try to import it via Alt+Enter
key it propose me java.jang.reflect.Array
, java.sql.Array
, com.sun.xml....Array
. So I can't import Scala Array with tail
and head
methods.
When I try: New Project
-> Scala Module
the are to problems:
a) When I choose Set Scala Home
it complains that there are missing files
b) When I choose Existent Library
there is nothing to choose in Compiler
/Standart
fields.
Question:
How to configure Intellij properly?
Upvotes: 13
Views: 13347
Reputation: 11
Make sure to manually add the scala-library
as a dependency to your module.
This is not done automatically when adding the Scala facet to an existing module.
Upvotes: 1
Reputation: 533
Is the directory you specified the right one? It should have bin, doc, etc. in it. If so, try entering the following by hand:
For compiler library, scala-compiler
For standard library, scala-library
IDEA found these for me automatically, but perhaps something went wrong for you.
Upvotes: 6