이 같은 자바에서 직접는 자바 애플 리케이션과 같은 스칼라 응용 프로그램을 실행 나는 다음과 로켓 발사 응용 프로그램을 실행하기 위해 노력하고있어
object HelloWorld {
def main(args: Array[String]) {
println("Hello World!")
}
}
을 :
java -cp scala-library.jar HelloWorld
(분명히 스칼라와 compliling 후)
하지만 다음과 같은 오류 얻을 :
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.
을
나는 그것을 일하게하기 위해해야 할 일이 사소한 일이라면 무엇을해야합니까? Java documentation에서
봐 : http://en.wikipedia.org/wiki/Scala_%28programming_language%29, 나는 스칼라가 올바른 클래스 경로를 설정하는 기대, 즉 자바를 사용에서 누락되었습니다. –