Applet download issues on OSX with both Safari and FireFox

D

d_cymbal

Hi,

I'm having a problem running an applet on OSX. It is working fine on
Windows using IE and Firefox and on Ubuntu Linux using Firefox.
Initially I assumed it to be a JRE version issue on the Mac but was
not. The Java console on safari reports:

basic: Exception: java.lang.ClassNotFoundException:
com.company.foo.application.MainApp.class
java.lang.ClassNotFoundException:
com.company.foo.application.MainApp.class
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:168)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:119)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:599)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:721)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1807)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:650)
at sun.applet.AppletPanel.run(AppletPanel.java:324)
at java.lang.Thread.run(Thread.java:613)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:271)
at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:44)
at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:158)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:155)
... 9 more

I thought the "open HTTP connection failed" was puzzling so I checked
the server log.

Both Safari and FireFox on OSX make a set of HTTP requests like this:

GET: /com/company/foo/application/MainApp.class
GET: /com/company/foo/application/MainApp.class.class

While the rest of the browser world requests

GET: /mainjar.jar

Which works.

Our HTML is

<APPLET ARCHIVE="mainjar.jar"
CODE="com.company.foo.application.MainApp.class">
</APPLET>

So it looks like Safari/FireFox bypass the jar file and tries to
download the main class file directly on OSX but FireFox does something
completely different (and works) on Windows/Linux???
 
L

Lothar Leidner

So it looks like Safari/FireFox bypass the jar file and tries to
download the main class file directly on OSX but FireFox does something
completely different (and works) on Windows/Linux???

In order to test this hypothesis I'd upload the class files onto the
server, too.

Lothar
 

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

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top