Bug 907 : Using multiple .jar files option in preferences doesn't work
Last modified: 2008-09-17 09:30



Assigned To:

Attachment Type Created Size Actions

Description:   Opened: 2008-09-01 03:14
Due to a Firefox (or Firefox Java plugin) bug, applets can't use loadImage
or XMLElement to retrieve data from the same server the applet is hosted on
if using domain names instead of IP addresses. A big problem, but it only
happens on some OSes (win2003 server and winXP, but not mac os x or vista)
and only when the applet uses multiple .jar files.

The only workaround I've been able to come up with is to use 1 .jar file
and use IP addresses in the applet for the images (for some reason images
require this, but XMLElement does not). But the latest PDE always exports
applets as multiple .jar files even if you have that option unchecked in
Additional Comment #1 From mueller 2008-09-01 03:16
Just to be clear, even if using just 1 .jar file in the applet, loadImage
will still not work with domain names. You need to use IP addresses with
Additional Comment #2 From fjen 2008-09-01 04:04
just a guess: can you check if this might be due to "www" missing infront of the domain name? in some situations "www.somedomain.tdl" is not treated as being equal to "somedomain.tdl".

Additional Comment #3 From fry 2008-09-01 04:48
Have you filed the Firefox bug with them?

I'm guessing that your sketch uses the OpenGL library (or perhaps some
other library), in which case it has to use separate JAR files. If you
don't have any libraries, then you'll get a single JAR.
Additional Comment #4 From mueller 2008-09-01 09:56
The url is stage.appletree.com. I haven't filed the Firefox bug with them.
I'm sure it's been filed, but I'll do so anyway soon. The multiple jar
issue is a bug in Processing isn't it? What's the point of that checkbox
in Processing's preferences dialog? I had to use an earlier version of
Processing (0135) and it works as expected. I use the xml library.
Processing v0135 simply put the core and xml packages within my overall
.jar file as you would expect given that preference option. Processing
v0148 just ignores that setting and always creates separate .jar files for
my website_visualization.jar, core.jar and xml.jar.
Additional Comment #5 From fry 2008-09-17 08:29
No, when libraries are in use, we need to use separate JAR files anyway, so
the setting is ignored. The behavior in 0135 was incorrect and more
Additional Comment #6 From fry 2008-09-17 08:32
Or to clarify, we need to use separate JAR files for the libraries
themselves. We could still bundle core.jar and the sketch code together,
but there's no point because that adds more spaghetti to the export code
and wouldn't actually fix this problem (since the error would still happen
as soon as the XML library tried to talk to core.jar).
Additional Comment #7 From mueller 2008-09-17 09:30
Just as an update, I had the 0135 big jar file version working perfect
before. I then made a very minor change, removing debugging statements,
cleaning up text, etc. And suddenly I started getting those security
exceptions again in Firefox :(. So now I'm using 0148. Since I've only
launched in a private beta at www.appletree.com, I tell people to use
another browser if they're using Firefox and they don't see the
visualization. I'm reading a couple books on Flash to port it over there

I've looked at the Processing source code and it looks like you call
standard openStream() Java functions. So it appears to be an issue with
Firefox's bridge to the JRE. But I haven't spent a lot of time on this as
I'll be porting it over soon anyway.