Reputation: 43
I'm new to Scala and IntelliJ.
I have already installed Scala on my Ubuntu PC:
printdoc@print$ scala
Welcome to Scala version 2.11.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_181).
Type in expressions to have them evaluated.
Type :help for more information.
scala>
Then, I install IntelliJ. I know that we need install Scala plugin to use Scala with IntelliJ. But I wonder if it will be duplicated because I already have Scala in my computer?
If so, how can I point the Scala location for IntelliJ, so that the IDE can re-use scala, instead of download a new one. Which is a better practice, between installing Scala plugin and reusing installed Scala?
The same question for sbt with IntelliJ.
Upvotes: 3
Views: 777
Reputation: 5948
When not using sbt with IntelliJ, you can manually choose to use the Scala jars installed on your system, but I recommend letting IntelliJ handle it. That makes it easier to select or upgrade the Scala SDK used with your project. The files may be duplicated, but that is an insignificant amount of storage.
But to answer your question, to use an installed Scala library:
+
Library...
New Library
/ Scala SDK
Download
. OR click Browse
and navigate to your scala installation and choose the relevant jars.Upvotes: 1