views:

91

answers:

1

Just starting to learn scala.. I can't seem to figure out how to compile something into a standalone application. I think I almost have a working .jar file, but keep getting a Main-Class error even though it's in the manifest,

+2  A: 

Scala programs require at a minimum the scala-library.jar file that accompanied the Scala Development Kit whose compiler you used to compile the sources. This is in addition to any 3rd-party Java (or Scala) libraries you might use. So from the perspective of building a stand-alone application (i.e., one that can be launched with a java -jar ... command) you must treat the scala-library.jar like a 3rd-party library.

Randall Schulz
does not including scala-library.jar have anything to do with the Main-Class error?
Chris Bolton
Yes, typically it does because the class containing the `main(args: Array[String]): Unit` method cannot be loaded due to failed dependencies on the Scala standard library.
Randall Schulz