I’ve created an SBT 0.11 project of an only one source code file (yet):
object HelloWorld extends App {
println("Hello, world!")
}
When try to run the application with SBT, I get “java.lang.RuntimeException: No main class detected”.
How do I define the main class?
I have used “full configuration” with the folowing Build.scala:
import sbt._
object MyBuild extends Build {
lazy val HelloWorld = Project("HelloWorld ", file("src"))
}
And the following build.sbt:
name := "HelloWorld"
version := "1.0"
scalaVersion := "2.9.1"
Try replacing:
with: