ClassNotFoundException / NoClassDefFoundError when running a Scala jar -


having scala project exported .jar eclipse, application started java -jar app.jar dies error java.lang.classnotfoundexception: scala.predef$.

full output:

exception in application start method exception in thread "main" java.lang.reflect.invocationtargetexception     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)     @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)     @ java.lang.reflect.method.invoke(method.java:490)     @ org.eclipse.jdt.internal.jarinjarloader.jarrsrcloader.main(jarrsrcloader.java:58) caused by: java.lang.runtimeexception: exception in application start method     @ com.sun.javafx.application.launcherimpl.launchapplication1(launcherimpl.java:829)     @ com.sun.javafx.application.launcherimpl.access$000(launcherimpl.java:56)     @ com.sun.javafx.application.launcherimpl$1.run(launcherimpl.java:150)     @ java.lang.thread.run(thread.java:722) caused by: java.lang.noclassdeffounderror: scala/predef$     @ main.app$.debug(app.scala:69)     @ main.app.start(app.scala:23)     @ com.sun.javafx.application.launcherimpl$5.run(launcherimpl.java:772)     @ com.sun.javafx.application.platformimpl$6.run(platformimpl.java:260)     @ com.sun.javafx.application.platformimpl$5$1.run(platformimpl.java:223)     @ com.sun.javafx.application.platformimpl$5$1.run(platformimpl.java:220)     @ java.security.accesscontroller.doprivileged(native method)     @ com.sun.javafx.application.platformimpl$5.run(platformimpl.java:220)     @ com.sun.glass.ui.invokelaterdispatcher$future.run(invokelaterdispatcher.java:94) caused by: java.lang.classnotfoundexception: scala.predef$     @ java.net.urlclassloader$1.run(urlclassloader.java:365)     @ java.net.urlclassloader$1.run(urlclassloader.java:354)     @ java.security.accesscontroller.doprivileged(native method)     @ java.net.urlclassloader.findclass(urlclassloader.java:353)     @ java.lang.classloader.loadclass(classloader.java:422)     @ java.lang.classloader.loadclass(classloader.java:355)     ... 9 more 

the referenced line at main.app$.debug(app.scala:69):

object app { //...     def debug(s: string) {         println("deb: "+s)     } // ...  } 

this seems caused because scala libraries not contained in jar. how fix this?

i have read solutions maven plugins prefer manual option.

manually push libs there in jar.. or have option script down


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -