This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 18.2, “How to compile, run, and package a Scala project with SBT.”Back to top
You want to use SBT to compile and run a Scala project, and package the project as a JAR file.Back to top
Create a directory layout to match what SBT expects, then run
sbt compile to compile your project,
sbt run to run your project, and
sbt package to package your project as a JAR file.
There’s just one person behind this website; if this article was helpful (or interesting), I’d appreciate it if you’d share it. Thanks, Al.