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

java.awt.Desktop methods should return a Process

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 6
    • Fix Version/s: None
    • Component/s: client-libs
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      A DESCRIPTION OF THE REQUEST :
      The Desktop provides methods to launch an application but does return an object to monitor and or manipulate the external application.

      JUSTIFICATION :
      This would allow a java application to monitor and or shutdown the external process (RFE 4333183 applies too) launched by the desktop. External processes can hold file locks that can only be released by closing the external application. If a java application is required to delete the generated file it has to block until the user closes the application or kill the external process on shutdown. The File.deleteOnExit() will fail because the process has the file locked.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      public Process open(File file) throws IOException
      public Process edit(File file) throws IOException
      public Process print(File file) throws IOException
      public Process browse(URI uri) throws IOException
      public Process mail() throws IOException
      public Process mail(URI mailtoURI) throws IOException


      ACTUAL -
      Methods that launch applications are defined as void (return nothing).

      CUSTOMER SUBMITTED WORKAROUND :
      Fall back and use the Runtime.exec(). The problem is that returned process might be for the shell process that launched the application and not the actual application.

        Attachments

          Activity

            People

            • Assignee:
              denis Denis Fokin (Inactive)
              Reporter:
              jleesunw Jon Lee (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Imported:
                Indexed: