Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Applet download issues on OSX with both Safari and FireFox

Reply
Thread Tools

Applet download issues on OSX with both Safari and FireFox

 
 
d_cymbal@hotmail.com
Guest
Posts: n/a
 
      10-10-2006
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(AppletClass Loader.java:16
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
at sun.applet.AppletClassLoader.loadClass(AppletClass Loader.java:119)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
at sun.applet.AppletClassLoader.loadCode(AppletClassL oader.java:599)
at sun.applet.AppletPanel.createApplet(AppletPanel.ja va: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(AppletClassL oader.java:271)
at sun.applet.AppletClassLoader.access$100(AppletClas sLoader.java:44)
at sun.applet.AppletClassLoader$1.run(AppletClassLoad er.java:15
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletClassLoader.findClass(AppletClass Loader.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???

 
Reply With Quote
 
 
 
 
Lothar Leidner
Guest
Posts: n/a
 
      10-11-2006
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
compilation error: file exists in both in both 'c:\WINNT\Microsoft.NET\Framework\v2.0.50727 ABCL ASP .Net 0 05-29-2008 04:59 PM
Apple Java which Browser to use ? Safari throwing NullPointerException with clean Applet code jackiespiegel@optonline.net Java 3 10-25-2007 04:32 PM
Asp.net web app issues with Firefox/Safari Benedictum ASP .Net 3 03-12-2007 02:40 PM
Can a Java program be both an applet and stand alone? janzon@gmail.com Java 7 02-23-2007 11:11 PM
2 computers, both online, both invisible to each other ? b Computer Support 9 04-21-2006 04:06 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57