I'm trying to run the following rocket launching application:
object HelloWorld {
def main(args: Array[String]) {
println("Hello World!")
}
}
directly from java like this:
java -cp scala-library.jar HelloWorld
(obviously after compliling with scala)
but get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
Caused by: java.lang.ClassNotFoundException: HelloWorld
at java.net.URLClassLoader$1.run(Unknown Source)
(...)
Could not find the main class: HelloWorld. Program will exit.
Have I overseen anything trivial that I need to do to make it work?