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

[macos 10.15] Catalina Security & Permission settings causes Robot to fail silently

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      os_x

      Description

      ADDITIONAL SYSTEM INFORMATION :
      MacOS Catalina
      version 10.15.4

      openjdk version "14" 2020-03-17
      OpenJDK Runtime Environment (build 14+36-1461)
      OpenJDK 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)

      A DESCRIPTION OF THE PROBLEM :
      MacOS Mojave added user controlled permission for MacOS resources such as accessibility controls. Catalina expanded on this with permissions for screen recording.

      Currently both causes java.awt.Robot functionality to fail silently from the applications perspective. MacOS may notify the end-user of permission settings that need to be change for the application. This happens once only and the OS request can get hidden behind other windows.

      What is needed is a programmatic way to explicitly check for permissions. This would allow the application to either change behavior as needed or to warn the user that permissions were not granted.

      Currently there is no easy way to detect mouse control or screen capture permissions without elaborate perform-and-test methods that are often not 100% reliable.

      Optionally it would be nice if there was also a way to force the OS to (re)request the user grant the permission required.

      This is also related to Bug ID: JDK-8218487


        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                serb Sergey Bylokhov
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: