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

stop applet JAR download when we exit the applet page

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • 7
    • 6
    • deploy
    • None
    • x86
    • windows

      when we run an applet that requires downloading a large JAR file to start, if we switch to another page in the browser, the applet won't be loaded, but the JAR download will continue until it is done.

      on unix, the JAR download will be stopped immediately.

      we did try to interrupt the loader thread as soon as we back out of the page (via AppletPanel.stopLoading), just that it didn't stop the download as we expected.

      Seems like this might be a limitation of our current implementation on windows. We are trying to do a Thread.interrupt() on a thread which is doing InputStream.read() (downloading JAR), and on windows, this won't work, see bug:

      4514257: Thread.interrupt() on InputStream.read() fails

      On solaris, it works fine and you can see the downloading stop immediately.

      There might be a way to workaround it on windows, using java.nio.channels.InterruptibleChannel. See workaround section of bug 4329256: interrupted thread no longer produces output.

            dphamsunw Danielle Pham (Inactive)
            ngthomas Thomas Ng (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: