FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 1330 : link() failing with some versions of Java on Mac OS X
Last modified: 2009-09-17 00:39
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
WONTFIX -
Pr
i
ority:
P2
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
widdowquinn
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2009-09-16 06:08
System:
Processing 1.0.7
OSX 10.5.8
Mac Pro 2x2.8GHz
Safari 4.0.3 (5531.9)
Java SE 6 64-bit
Using link() to call out to a website works in the stand-alone application, and when used from
the PDE, but does nothing when run as an applet.
void setup() {
size(1024, 576);
}
void draw() {
background(255);
rect(300, 300, 200, 200);
}
void mousePressed() {
link("
http://www.processing.org/
");
}
This bug is not seen on the following system:
Processing 1.0.3
OSX 10.6.1
MacBook Pro 2GHz Core Duo
Safari 4.0.3 (6531.9)
Java SE 6 32-bit
Additional Comment
#1 From widdowquinn 2009-09-16 06:13
Chasing this down further, it appears to be an issue either with the browser or the Java version.
Viewing the Mac Pro applet from the MacBook Pro works (links out). Viewing the MacBook Pro
applet from the Mac Pro does not work (does not link out).
Additional Comment
#2 From widdowquinn 2009-09-16 06:22
Changing the Java version used for the applet in Safari 4.0.3 (5531.9) makes the applet
work, but only if the argument "_new" is not passed to link().
This fails:
void mousePressed() {
link("
http://www.processing.org/
", "_new");
}
This works:
void mousePressed() {
link("
http://www.processing.org/
");
}
The Java console reads:
liveconnect: JSObject::call: name=open
(no further text)
Additional Comment
#3 From widdowquinn 2009-09-16 06:25
In summary:
On Mac Pro, as above:
Java SE 6 64-bit fails.
J2SE 5.0 64-bit works if "_new" is not passed.
J2SE 5.0 32-bit works if "_new" is not passed.
On MacBook Pro, as above:
Java SE 6 32-bit works.
Additional Comment
#4 From fry 2009-09-16 11:41
This is an Apple bug, unfortunately. Please file it at
bugreporter.apple.com. The code behind link() is just a single line of Java:
link() with just a URL:
getAppletContext().showDocument(new URL(url));
link() with URL and a frame:
getAppletContext().showDocument(new URL(url), frameTitle);
That is apparently behaving differently between browsers.
Additional Comment
#5 From widdowquinn 2009-09-17 00:39
Thanks for looking into it so promptly - I'll report it to Apple.