We help IT Professionals succeed at work.

java applet sometimes looks for non-existant files

olbion2
olbion2 asked
on
I'm working with an applet that was not originally made by me, and that is used by a large number of users.

From my web server log files I can see that the applet sometimes looks for files based on the codebase of the applet which do not exist on the webserver and so cause a 404 error.

The files that are looked for are these:
icons/image-delayed.png
icons/image-failed.png
com/sun/media/sound/DirectAudioDeviceProvider.class
com/sun/media/sound/PortMixerProvider.class

For the first two of these I cannot find any pattern regarding what browsers and/or java versions are involved, but the second two only seem to happen on Apple computers (using Firefox or Safari).

The java code of the applet does not mention any of the files or class names as far as I can see. Googling the file names returns little.

Any ideas what the cause(s) can be?
Comment
Watch Question

BRONZE EXPERT
Top Expert 2016

Commented:
*Is* there any sound used in the applet?
BRONZE EXPERT
Top Expert 2016

Commented:
If you can possibly post a link to the applet too, so much the better

Author

Commented:
Hi,

Yes, the applet uses sound. The sound files are loaded from codeBase/sound when they are first played.

The applet is reachable on www.quadplex.com. Use the link under Guests ("click here") to reach the page where the applet loads.
BRONZE EXPERT
Top Expert 2016

Commented:
Applet works fine for me on Debian Linux (Etch) + Sun Java 1.5.0_10

In fact the whole thing looks rather good to me

It's conceivable that those sound classes are not available in certain runtimes

btw, are the opponents human? If so, i need to convey my apologies to mine - i just lost him/her ;-)

Author

Commented:
Hi,

Yes, the applet works fine on most computers. But I'd like to resolve these 404 issues anyway. I guess it's possible that the sound classes are unavailable in some runtimes - but isn't it strange then that googling their names returns so little?

The opponents are indeed human... I'm sure you are forgiven though
BRONZE EXPERT
Top Expert 2016

Commented:
As far as the image files are concerned, i think they could be part of the runtime: perhaps Motif- windowing-oriented
BRONZE EXPERT
Top Expert 2016

Commented:
You might avoid the problems with non finding the pngs by getting them from the OpenJDK source and putting them on the server. How much use they'd then be to the calling code is another matter...
BRONZE EXPERT
Top Expert 2016
Commented:
Here they are in case you want them in what's really a jar (the 'basic' package, but should be OK)
icons.jar.txt
Mick BarryJava Developer
BRONZE EXPERT
Top Expert 2010
Commented:
its a version mismatch problem. make sure you compile it using the lowest version you require. Failing that yopu can put the resources on your saerver, but thats not recomended.

Author

Commented:
Hi,

For now, I included the images in the jar file and put the compiled classes taken from the OpenJDK source on the webserver. So far so good.
BRONZE EXPERT
Top Expert 2016

Commented:
:-)

Explore More ContentExplore courses, solutions, and other research materials related to this topic.