I want to create a runnable jar file from a Scala project. I install sbt on window 7. I create a file hw.scala :
object Hi {
def main(args: Array[String]) = println("Hi!")
}
File built.sbt ( in the same directory )
lazy val root = (project in file(".")).
settings(
name := "hello",
version := "1.0",
scalaVersion := "2.11.4"
)
When I run "sbt run", it displays the result. After that, I run "sbt compile" then "sbt package". However when I run
java -jar target\scala-2.11\hello_2.11-1.0.jar
The consonle notice the error : java.lang.NoClassDefFoundError.
Could some one help me ?