-
Bug
-
Resolution: Cannot Reproduce
-
P2
-
None
-
6u4
-
x86
-
solaris_10
Call of java.awt.Desktop.getDesktop().browse(URI) fails. It fails both when browser is already running and not running. Call stack:
java.io.IOException: Failed to show URI:http://www.sun.com
at sun.awt.X11.XDesktopPeer.launch(XDesktopPeer.java:75)
at sun.awt.X11.XDesktopPeer.browse(XDesktopPeer.java:64)
at java.awt.Desktop.browse(Desktop.java:368)
at BrowserTest.main(BrowserTest.java:15)
Simple test class:
import java.awt.Desktop;
import java.net.URI;
public class BrowserTest {
public BrowserTest () {
}
public static void main(String[] args) {
if (Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
try {
Desktop.getDesktop().browse(new URI("http://www.sun.com"));
}
catch (Exception e) {
e.printStackTrace();
}
}
}
}
The same happens with JDK 7 b24. Gnome, JDS release 3.
bash-3.00$ uname -a
SunOS dhcp-eprg06-20-81 5.10 Generic_125101-10 i86pc i386 i86pc
java.io.IOException: Failed to show URI:http://www.sun.com
at sun.awt.X11.XDesktopPeer.launch(XDesktopPeer.java:75)
at sun.awt.X11.XDesktopPeer.browse(XDesktopPeer.java:64)
at java.awt.Desktop.browse(Desktop.java:368)
at BrowserTest.main(BrowserTest.java:15)
Simple test class:
import java.awt.Desktop;
import java.net.URI;
public class BrowserTest {
public BrowserTest () {
}
public static void main(String[] args) {
if (Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
try {
Desktop.getDesktop().browse(new URI("http://www.sun.com"));
}
catch (Exception e) {
e.printStackTrace();
}
}
}
}
The same happens with JDK 7 b24. Gnome, JDS release 3.
bash-3.00$ uname -a
SunOS dhcp-eprg06-20-81 5.10 Generic_125101-10 i86pc i386 i86pc