CA Gen 8.6 Build Tool fails to open (cannot find '...OpenJDK\jdk8u212-b04-jre\;bin\javaw')
search cancel

CA Gen 8.6 Build Tool fails to open (cannot find '...OpenJDK\jdk8u212-b04-jre\;bin\javaw')

book

Article ID: 220121

calendar_today

Updated On:

Products

Gen

Issue/Introduction

Have created a Gen 8.6 install package for developers to push on their PCs.
The packaging team followed the instructions Silently Install Gen Product Software, but when try to open the build tool, receive the error:
Windows cannot find 'C:\Program Files (x86)\CA\SharedComponents\JRE\OpenJDK\jdk8u212-b04-jre\;bin\javaw'



Environment

Component: Gen Build Tool

Cause

The error is:
Windows cannot find "C:\Program Files (x86)\CA\SharedComponents\JRE\OpenJDK\jdk8u212-b04-jre\;bin\javaw"

The above path to the Java program javaw (javaw.exe) is based on the Gen 8.6 environment variable Gen86JRE which the Build Tool startup script BLDTOOL.BAT uses to run it i.e "C:\Program Files (x86)\CA\Gen86\Gen\BLDTOOL.BAT" contains this line:
+++
start "" "%GEN86JRE%bin\javaw" -jar "%GEN86%\gen\bt\bt.ui.jar"
+++

The environment variable Gen86JRE should have the value:
Gen86JRE=C:\Program Files (x86)\CA\SharedComponents\JRE\OpenJDK\jdk8u212-b04-jre\
However in this case there is an extra semi-colon ";" in the path to the javaw executable (javaw.exe) which is the root cause of the problem and indicates that Gen86JRE has an extra ";" at the end i.e. 
Gen86JRE=C:\Program Files (x86)\CA\SharedComponents\JRE\OpenJDK\jdk8u212-b04-jre\;

Resolution

Use "Control Panel" > "System" > "Advanced System Settings" > "Environment Variables" to edit the value of Gen86JRE and remove the extra ";" from the end.
Then the Build Tool started successfully.

Additional Information

Additional diagnostics:
1. The Gen 8.6 GA software install (GUI or silent) installs Oracle JRE into "C:\Program Files (x86)\CA\SharedComponents\JRE\1.8.0_60\" and sets Gen86JRE to its directory (there is no user option to be able to alter that value) i.e.
Gen86JRE=C:\Program Files (x86)\CA\SharedComponents\JRE\1.8.0_60\
NOTE: The above is the Oracle JRE because support for OpenJDK came in a later PTF which is included in WKS86200.

2. Installing Gen 8.6 Complete PTF WKS82600 installs the OpenJDK JRE into "C:\Program Files (x86)\CA\SharedComponents\JRE\OpenJDK\jdk8u212-b04-jre\" and sets Gen86JRE to its directory (again there is no user option to be able to alter that value) i.e.
Gen86JRE=C:\Program Files (x86)\CA\SharedComponents\JRE\OpenJDK\jdk8u212-b04-jre\
The install of WKS82600.exe runs an embedded file openjdk.bat to install the OpenJDK and set Gen86JRE, so unless the PTF has been unpacked and that file has somehow been changed why the extra ";" should not have been caused by the PTF install itself.
Perhaps the packaging team is adding an extra step after the .msi install & WKS86200 install have been done to manually set all required Gen 8.6 environment variables and that has resulted in accidentally setting Gen86JRE to have the extra ";" at the end.

3. The root cause diagnosis for the above was not pursued and so was never determined

Documentation/KB articles:
Gen™ 8.6 > Installing > Install Gen on Windows > Installing Gen on the Windows Platform > Silently Install Gen Product Software
Gen™ 8.6 > Technical Requirements > General Comments > Gen Tools that Require Java
Installing Gen Windows PTFs in silent/unattended mode