My program (written in Scala 2.8) works fine when launched using NetBeans. But when I try to run it from the outside, with "java-jar", it says "Exception in thread" main "java.lang.NoClassDefFoundError: scala / ScalaObject ...". The premises of all libraries, including Scala runtime inside the same directory as the running jar does not help. If I try to start the jar from Scala itself, it complains that it cannot decode it as utf-8 (it expects a Scala source, not a jar, I suppose). So how do I launch a Scala application?
UPDATE: for those who come here later with the same question, I would recommend reading the comments in response to barjak (including the ones that were hidden last), there is an answer. VonC also provides some interesting links on this topic.
Ivan source
share