Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module SDK for Scala in IntelliJ Idea

How do you create Module SDK in Project Settings / Modules / Dependencies for Scala in IntelliJ Idea?

like image 741
Etam Avatar asked Jan 23 '11 12:01

Etam


People also ask

How do I get Scala SDK?

Assuming this is your first time creating a Scala project with IntelliJ, you'll need to install a Scala SDK. To the right of the Scala SDK field, click the Create button. Select the highest version number (e.g. 2.13. 8) and click Download.

What is module SDK in IntelliJ?

A Software Development Kit, or an SDK, is a collection of tools that you need to develop an application for a specific software framework. For example, to develop applications in Java, you need a Java SDK (JDK). SDKs contain binaries, source code for the binaries, and documentation for the source code.

Can you run Scala in IntelliJ?

Run Scala applicationsYou can run your Scala code through IntelliJ IDEA, use sbt shell, or use Scala worksheet for a quick code evaluation.


1 Answers

I'm assuming you mean Project Structure -> Modules -> Dependencies

You can just click on the Add... button in that view. A "Module" here is simply a Jar file or directory containing classes.

You wouldn't normally do this though. A better approach is:

  • Create the project using Maven and the maven-scala-plugin, then import it as a Maven project into IntelliJ

or

  • Create the project using SBT, and use the SBT IDEA plugin to generate the IntelliJ project

Either way, the correct dependencies will then be created for you.

UPDATE

Based on your comment, it looks as though your problem is that IntelliJ doesn't know where to find the Java SDK (this is nothing to do with modules, it just happens to appear in that window)

Under Project Structure -> Project, you'll see an option for "Project SDK" with the value "" highlighted in red.

Click the new button beside this, select "jsdk", and point it to the directory where you installed the Java SDK.

Then all should be good.

like image 181
Kevin Wright Avatar answered Oct 05 '22 20:10

Kevin Wright