Install the Java Agent on Windows

The Keyfactor Java AgentClosed The Java Agent, one of Keyfactor's suite of orchestrators, is used to perform discovery of Java keystores and PEM certificate stores, to inventory discovered stores, and to push certificates out to stores as needed. installation script offers the option to install the Java agent directly or use the installation script to build an msi package that you can then use to install the Java agent on multiple machines.

Note:  If you have a previously installed version of the Keyfactor Java Agent on this server, you need to uninstall it (see Uninstall the Java Agent) before installing a new version.

To begin the Java agent installation on Windows, unzip the installation files and place them in a temporary working directory.

  1. On the Windows machine on which you wish to install the Java agent or build the package, open a PowerShell window using the "Run as administrator" option and change to the temporary directory where you placed the installation files.
  2. In the PowerShell window, run the cms-java-agent-installer.bat file to begin the installation. You will be prompted to answer several questions:
  3. After answering the AnyAgentClosed The AnyAgent, one of Keyfactor's suite of orchestrators, is used to allow management of certificates regardless of source or location by allowing customers to implement custom agent functionality via an API. components question, the installation begins. Review the output to be sure that no errors have occurred and then press any key to return to the PowerShell prompt.

    Figure 543: Keyfactor Java Agent Local Installation on Windows

  4. In the PowerShell window, change to the install directory within the directory in which you installed the Java agent. If you installed in the default install directory, this path is:

    C:\Program Files\Keyfactor\Keyfactor Java Agent\install

  5. In the PowerShell window, run the install.ps1 PowerShell script. Unless you selected SYSTEM as the user the agent should run as, you will be prompted to enter the username (DOMAIN\username format) and password of the account that will run the Keyfactor Java Agent service on the local machine. This is the service account for the Java agent side of the fence you created as per Create Service Accounts for the Java Agent. Press Enter without entering any data to run the service under the local system credentials.

    Note:  The install.ps1 may fail with an error similar to the following on older versions of Windows:
    Method invocation failed because [System.Object[]] doesn't contain a method named 'Replace'.

    If this occurs, you need to manually grant the service account under which the Keyfactor Java Agent service will run the local "Log on as a service" permission and then run the install.ps1 script again.

Tip:  If you choose the "msi" option rather than the "local" option, the MSI file will be generated in the directory in which you executed the batch file.