java - Jar file execution issue? -
i using command run jar file
java -cp otpreq.jar com.otp.req.sendrequest
and giving error-:
error: jni error has occurred, please check installation , try again exception in thread "main" java.lang.noclassdeffounderror: org/apache/commons/httpclient/methods/requestentity @ java.lang.class.getdeclaredmethods0(native method) @ java.lang.class.privategetdeclaredmethods(unknown source) @ java.lang.class.privategetmethodrecursive(unknown source) @ java.lang.class.getmethod0(unknown source) @ java.lang.class.getmethod(unknown source) @ sun.launcher.launcherhelper.validatemainclass(unknown source) @ sun.launcher.launcherhelper.checkandloadmain(unknown source) caused by: java.lang.classnotfoundexception: org.apache.commons.httpclient.methods.requestentity @ 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) ... 7 more
why error coming can't figure out .
i checked library , org/apache/commons/httpclient/methods/requestentity interface.
assuming have http-client.jar:
java -cp otpreq.jar:http-client.jar com.otp.req.sendrequest
if o.s windows, replace : ;
note: newest httpclient not located @ apache commons, @ apache http components
Comments
Post a Comment