Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6676099

Desktop.browse(URI) fails to open browser on Solaris 10/Gnome

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P2 P2
    • None
    • 6u4
    • client-libs
    • 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

            denis Denis Fokin (Inactive)
            mslamasunw Marek Slama (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: