netbeans - java.lang.NoClassDefFoundError: javax/persistence/Query when trying to run EE Jar from Windows CMD? -
netbeans - java.lang.NoClassDefFoundError: javax/persistence/Query when trying to run EE Jar from Windows CMD? -
i wrote java client enterprise application, , works when run netbeans.
please notice there query run on start of application send query entitybean.
the problem when seek run jar
application windows command line
, error appear me:
java -jar apps.jar
exception in thread "main" java.lang.noclas sdeffounderror: javax/persistence/query @ apps.main.main(main.java:75) caused by: java.lang.classnotfoundexception: javax.persistence.query @ java.net.urlclassloader$1.run(unknown source) @ java.net.urlclassloader$1.run(unknown source) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(unknown source) @ java.lang.classloader.loadclass(unknown source) @ sun.misc.launcher$appclassloader.loadclass(unknown source) @ java.lang.classloader.loadclass(unknown source) ... 1 more
i'm surprised! because connected between entitymanger
, database
, used libraries of javax.persistence
! .. why don't see library while trying send queyr?!
so how solve problem run application command line where? not netbeans
?!
java_home
, path
variables on windows thanks,
java netbeans ejb persistence
Comments
Post a Comment