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???
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???