Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Class not found applet error

hi
i am creating signed applet to download file from server using HTTP. i am using commons-httpclient-3.0.1.jar file. i am creating jar file HttpUtil.jar and init i placed lib/commons-httpclient-3.0.1.jar and HttpUtil.class. i update my HttpUtils.jar's Manifest file with Class-Path: lib/commons-httpclient-3.0.1.jar
when try to access with browser (ie 6.0 sp2) I get 'Applet notinited' error
through appletviewer get

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:65)

at HttpUtil.getDataFiles(HttpUtil.java:59)
at HttpUtil.init(HttpUtil.java:26)
at sun.applet.AppletPanel.run(AppletPanel.java:353)
at java.lang.Thread.run(Thread.java:534)

i created jar file through
jar -cvfm HttpUtil.jar Manifest.txt HttpUtil.class lib
help me to sort out this prob :confused:
[980 byte] By [vicky_31] at [2007-11-11 8:45:04]
# 1 Re: Class not found applet error
your problem is, that the httpclient also has dependent packages, like
commons-logging (where the class LogFactory is to be found). just add it to your application. and i'm not shure, if the logging package is the only dependency. just try out and have a look at the dependency descriptions of the http client.
graviton at 2007-11-11 22:34:29 >