CAST HIGHLIGHT - Code Reader - “Please install openJDK 11” error even after installing JDK 11

While opening HL Code Reader the error: “Please install openJDK 11” is seen even after installing JDK 11.

 

Solution

As mentioned in the code reader documentation, Code Reader currently officially only supports Java 11.

  1. Check whether Java is installed correctly and confirm that OpenJDK 11 is installed and working. Run from a command prompt:
    java -version

    Check if OpenJDK 11 is shown as the active version.

  2. Check whether you have JAVA_HOME environment variable set?  JAVA_HOME variable should be set to OpenJDK 11. in USER and SYSTEM both.
      1. Check in CMD window

        echo  %JAVA_HOME%
      2. Check whether you have OpenJDK 11 in your PATH variable? For more information about modifying the Environment variables please check CAST HIGHLIGHT - Code reader - Setup - Java not detected on your system. Please install openJDK 11
  3. Check whether there are multiple Java versions in the PATH. Even though java -version shows 11, there could be another Java runtime (older or JRE) that the Code Reader picks up. CAST may not be resolving the same Java executable that CMD does.
  4. Check whether there is a 32-bit vs 64-bit mismatch. CAST uses 64-bit. If the JDK installed is 32-bit, it may fail, even if java -version works in cmd.
  5. Check whether the installed version of OpenJDK 11 is obsolete such as OpenJDK 11 GA (2018), CAST may require Java 11 LTS updates (like 11.0.22 or newer). Many modern tools reject the original GA build due to missing security patches.

Follow the below steps to remove and replace an incompatible version of Open JDK 11.

      1. Uninstall the current OpenJDK 11.0.0 GA build.
      2. Download and install the latest Adoptium (Eclipse Temurin) JDK 11 LTS: https://adoptium.net/temurin/releases/?version=11
        (Choose Windows x64 MSI installer.)
      3. Update JAVA_HOME to the new installation folder, e.g.: C:\Program Files\Eclipse Adoptium\jdk-11.0.22.7-hotspot 
      4. Ensure PATH includes ...\bin from the new installation and remove old Java paths. 
      5. Reboot the system (important for environment variable updates). 
      6. Run in CMD:
        java -version

        It should show something like:

        openjdk version "11.0.22" 2024-01-16

      7. Re-launch CAST Highlight Code Reader.

 

Ticket

49808, 54635

 

Related Articles / Documents

For the pre-requisites to install code reader check https://doc.casthighlight.com/codereader/readme.md

CAST HIGHLIGHT - Code reader - Setup - Java not detected on your system. Please install openJDK 11

 

Additional Resources

CAST Highlight Troubleshooting Guides

CAST Highlight Product Documentation

 

Have more questions? Submit a request

Comments

Powered by Zendesk