I want to map over the characters in a string, but I'm getting runtime errors.
Example:
object Hello {
def hello(c: Char) {
print(c)
}
def main(args: Array[String]) {
"Hello World!".map(hello)
}
}
Trace:
scalac Hello.scala
java Hello
Exception in thread "main" java.lang.NoClassDefFoundError: scala/LowPriorityImplicits
at Hello.main(Hello.scala)
Caused by: java.lang.ClassNotFoundException: scala.LowPriorityImplicits
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 1 more
make: *** [test] Error 1