Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2006

Tip: Looking for answers? Try searching our database.

Applet download issues on OSX with both Safari and FireFox

Thread view: 
d_cymbal@hotmail.com - 10 Oct 2006 17:24 GMT
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???
Lothar Leidner - 11 Oct 2006 13:08 GMT
d_cymbal@hotmail.com schrieb:
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.