---
title: Installing Java
description: PingFederate requires a Java Runtime Environment (JRE) to be installed on your server.
component: pingfederate
version: 12.3
page_id: pingfederate:installing_and_uninstalling_pingfederate:pf_install_java
canonical_url: https://docs.pingidentity.com/pingfederate/13.1/installing_and_uninstalling_pingfederate/pf_install_java.html
llms_txt: https://docs.pingidentity.com/pingfederate/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: August 22, 2024
superseded_by: https://docs.pingidentity.com/pingfederate/13.1/installing_and_uninstalling_pingfederate/pf_install_java.html
section_ids:
  about-this-task: About this task
  steps: Steps
  example: Example:
---

# Installing Java

PingFederate requires a Java Runtime Environment (JRE) *(tooltip: \<div class="paragraph">
\<p>A software layer that provides the class libraries and resources needed for a Java program to run.\</p>
\</div>)* to be installed on your server.

## About this task

PingFederate has been tested in the following Java environments:

* Amazon Corretto 11, 17, and 21

* OpenJDK 11, 17, and 21

* Oracle Java SE Development Kit 11 LTS, 17 LTS, and 21 LTS

|   |                                                                                                                                                                                                  |
| - | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|   | Ping Identity Java Support Policy applies. Learn more in [Java Support Policy](https://support.pingidentity.com/s/article/PingIdentity-Java-Support-Policy) in the Ping Identity Knowledge Base. |

|   |                                                                                                                                                                                        |
| - | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | PingFederate does not support any JDK 11 version prior to 11.0.4 due to an error covered in the [Oracle Java Bug Database](https://bugs.java.com/bugdatabase/view_bug?bug_id=8215790). |

|   |                                                                                                                                                                                                                                              |
| - | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | For Oracle Java SE Development Kit 11, the JCE jurisdiction policy defaults to unlimited strength. For more information, see the [Oracle JDK Migration Guide](https://docs.oracle.com/en/java/javase/11/migrate/) in Oracle's documentation. |

## Steps

1. Download and install a Java runtime.

2. Set the *JAVA_HOME* environment variable to the Java installation directory path and add its `bin` directory to the *PATH* environment variable.

   ### Example:

   ```
   JAVA_HOME=C:\Program Files\Java\jdk-17
   PATH=%JAVA_HOME%\bin
   ```

   |   |                                                                                                                                                                                                                                                                                                                                                                     |
   | - | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   |   | If you intend to use the PingFederate installer for Windows or run PingFederate as a service, you must set the *JAVA_HOME* environment variable and modify the *PATH* environment variable at the system level. If you are not using the PingFederate installer or running PingFederate as a service, you can set the variables at either the system or user level. |

   |   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
   | - | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   |   | When running PingFederate for Windows, switching the Java version from 11 to 17, or 11 to 21, prevents the service from running, and you won't be able to start PingFederate. The problem occurs because garbage collection logging configuration arguments that are used by Java 17 and 21 are incompatible with those used by Java 11.To change Java versions:1) Run `<pf_install>\pingfederate\sbin\win-x86-64\uninstall-service.bat` to de-register the PingFederate service.

   2) Install the new Java version and update the *JAVA_HOME* and *PATH* environment variables.

   3) Run `<pf_install>\pingfederate\sbin\win-x86-64\install-service.bat` to register the PingFederate service. |
