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

DnD: file associations don't work for dragged out applets

XMLWordPrintable

    • b01
    • generic, x86
    • generic, linux, windows
    • Not verified

      A customer (see Comments for details) indicates that he has tried to specify a file assocation for a JNLP-launched applet which he then drags out of the browser to the desktop. The file association is correctly produced, but when a file of that type is double-clicked, there is currently no way for the applet to discover what file was selected, because it does not have a main() method and we are not doing anything to pass along the command line arguments to the applet. A mechanism for doing this will need to be created and documented.
      We need to provide some way of exposing the command-line arguments to the given applet. A reasonable way might be to define the applet parameter

        _numArgs

      as containing an integer (in the form of a String) indicating the number of arguments, and

        _arg0
        _arg1
        ...
        _arg(n)

      where n == _numArgs - 1 as the incoming command line arguments. This information would need to be set up by the JNLP2Viewer class before launching the applet. Also, the underlying launcher will need to pass up the additional command line arguments, and the argument checking in JNLP2Viewer will need to be adjusted.

            ccheung Calvin Cheung
            kbr Kenneth Russell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: