Share via

Windows Server 2022 displays "Can't run on your PC" running Microsoft JDK keytool

ChrisAV 0 Reputation points
2026-03-26T19:37:27.6733333+00:00

I am using Windows Server 2022 and installed Microsoft JDK 17 to run application. Installs fine and ran keytool.exe fine after installation. Since then which was approximately 2 weeks ago, now I get "This app can't run on your PC" popup. I tried a different OpenJDK vendor and same behavior. Works on install then at some point, it stops working. One note to mention is I have the same JDK installed on anther Windows Server 2022 and it seems to work find. Does anyone know what is causing this issue?

Microsoft Security | Microsoft Defender | Other
0 comments No comments

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-03-26T19:37:40.9933333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The behavior described is not documented as a known issue with Microsoft Build of OpenJDK 17 or with Windows Server 2022 in the provided material. However, there are a few concrete checks and mitigations that can be applied on the affected server:

    1. Verify the keytool binary and JDK installation
      • Reinstall Microsoft Build of OpenJDK 17 from a known-good source.
      • After reinstall, confirm that keytool.exe runs from an elevated Command Prompt or PowerShell.
      • Compare the file size and digital signature of keytool.exe on the problematic server with the working Windows Server 2022 instance to ensure the binary is not corrupted or modified.
    2. Check for security or AV interference
      • Since the tag mentions Microsoft Defender, check Microsoft Defender or any other security product’s history/quarantine to see if keytool.exe or related JDK files have been blocked, quarantined, or modified after installation.
      • If such an event is found, restore the file (if appropriate) and add an exclusion for the JDK installation directory, then test again.
    3. Confirm OS health and updates
      • Ensure Windows Server 2022 is fully updated on the affected machine and matches the patch level of the working server.
      • If the issue started after a specific update or configuration change, review that change and test whether reverting it (if possible) restores keytool.exe functionality.
    4. Test with a fresh JDK path
      • Install Microsoft Build of OpenJDK 17 or 21 into a new directory (do not overwrite the existing one) and run keytool.exe from that new path.
      • If the new installation works while the old one still fails, this points to local corruption or security blocking of the original installation directory.
    5. Compare environment and policies between servers
      • Compare Group Policy Objects (GPOs), AppLocker rules, or other application control policies between the working and non-working Windows Server 2022 instances.
      • If application control is enabled, ensure keytool.exe and the JDK folder are allowed.
    6. As a last resort, consider using a newer JDK
      • Microsoft Build of OpenJDK 21 is available and includes enhancements and fixes, including changes related to Windows APIs. Installing and testing with 21 on the affected server can help determine whether the behavior is specific to the 17 installation.

    If none of these steps resolve the issue, collecting logs from Microsoft Defender (or other security tools) and Windows Event Viewer (Application and System logs) around the time keytool.exe fails, then opening a support case with Microsoft would be the next step.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.