While attempting to reinstall Agent for SharePoint, the installer is not recognizing the JDK installation regardless of what folder the installer is pointed to. The JAVA_TOOL_OPTIONS environment variable is set per the following article:
Access Gateway installer does not recognize JDK 11.0.20 - Invalid JDK/JVM error or installer fails to launch
The feedback from the installer is that the specified path does not point to a valid JDK installation.
Agent for SharePoint 12.8.x
Access Gateway 12.8.x
Although the installer is prompting for an absolute path, it needs the path and filename of the java executable (java.exe on Windows, java on Linux). This executable is in the JDK's /bin folder.
Include the full path and filename of the JDK's java executable.