Applet "archive" attribute giving NoClassDefFoundError

A

andrew

Hi:

I'm having an issue loading an applet via a webpage/browser. The HTML
code section looks like this:
<applet
code="com.company.package.ThisApplet"
codebase="http://localhost:82/bin/"
archive="jdom.jar"
height="400" width="300"
where in my Apache httpd.conf I have set up a VirtualHost for port 82:
<VirtualHost *:82>
DocumentRoot C:/webroot
</VirtualHost>

The Java Console spits out the following error:
Loading CustomizerApplet
java.lang.NoClassDefFoundError: org/jdom/input/SAXBuilder
at com.company.package.ThisApplet.init(ThisApplet.java:91)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Line "91" in "ThisApplet.java" is the following line:
SAXBuilder builder = new SAXBuilder();

The file structure that is reference looks like the following:
C:\webroot\bin\jdom.jar
C:\webroot\bin\com\company\package\ThisApplet.class

For some additional info, this is from Apache's error.log:
File does not exist: C:/webroot/bin/org
and this is from the access.log:
"GET /bin/jdom.jar HTTP/1.1" 200
...
"GET /bin/org/jdom/input/SAXBuilder.class HTTP/1.1" 404


My assumption is that for some reason the .jar file is not being read
as part of the classpath. Is this correct? Does anyone have any
suggestions for this and/or have seen this before?

Thanks a ton, Andy
 
T

Thomas Hawtin

"GET /bin/jdom.jar HTTP/1.1" 200
...
"GET /bin/org/jdom/input/SAXBuilder.class HTTP/1.1" 404

Perhaps your server isn't configured to return the jar with the
appropriate MIME type. You could try

telnet localhost 82
HEAD /bin/jdom.jar HTTP/1.0
Host: localhost


(Finnish with two returns.)

It might be worth renaming the jar as jdom.zip (and also in the applet
tag), as that is much more likely to be configured correctly.

Tom Hawtin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top