

When prompted to do so, select Import build.

More documentation about sbt can be found in the Scala Book (see here for the Scala 2 version)Īnd in the official sbt documentation With an IDE Main.scala (Entry point of program) <- this is all we need for now scala (all of your Scala code goes here) build.sbt (sbt's build definition file) project (sbt uses this for its own files) Let’s take a look at what just got generated:.When prompted, name the application hello-world.It will also create a target folder, which you can ignore. This pulls a project template from GitHub. Run the command sbt new scala/scala3.g8 to create a Scala 3 project, or sbt new scala/hello-world.g8 to create a Scala 2 project.(It can also publish libraries and do many other tasks.)

sbt compiles, runs,Īnd tests your Scala code. If you are familiar with the command line, we recommend that approach. To create a project, you can either use the command line or an IDE. Once you have installed sbt, you are ready to create a Scala project, which Refer to JDK Compatibility for Scala/Java compatibility detail. if you don’t have Java 8 or 11 installed, download.You only need two tools to compile, run, test, and package a Scala project: Java 8 or 11,
