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

Add a system method for launching the user's default browser

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.7, 1.4.1, 5.0
    • core-libs
    • generic, x86
    • generic, windows_xp

      Name: dbT83986 Date: 02/09/99


      I subscribe to several Java development mailing lists for various platforms.
      One question that comes up alot is how to best use Runtime.exec() to pass a URL
      to the Netscape browser. Now, on UNIX and Windows platforms, one can pass in a
      String containing the URL as one of the parameters, or just pass in the URL as
      part of a command-line flag( i.e.: 'Runtime.exec("netscape -remote http://my.url.com")');
      however, on Macintosh, command-line flags are not
      supported. Apple's Java porting team has worked around this issue by having
      their implementation of the runtime parse the parameters, and if the parameter
      looks like a URL, they send a "gurl" AppleEvent to the browser, which tells it
      to load the URL.

      Since this seems to be the most common use of Runtime.exec(), it would be a
      nice feature to have an exec method which accepts a URL object (this would make
      life easier for the Apple folks, at least - they could just have their
      implementation send the "gurl" event when Runtime.exec() is called with a URL object as a
      parameter). In this way, developers could simply pass in a URL object (which
      may have been constructed for some other reason in their application) to invoke
      the browser with.

      This way, the platform-dependent implementation could just
      get the URL string from the URL object and pass it appropriately
      to the browser.
      (Review ID: 43562)
      ======================================================================

            Unassigned Unassigned
            dblairsunw Dave Blair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: