We have done a lot of agent migrations to Build 979 and one of the agents was found loading the JAVA_HOME variable in run time. It is setting the value to /opt/CA/WorkloadAutomationAE/JRE_WA. We have already checked global/user profiles and profile.CA/auto.*. The job's profile attribute was also blank. How can we prevent the agent form setting the JAVA_HOME variable?
CA Workload Automation AE r11.3.5+
If the agent is installed on the same server as the scheduler OR if there is a client installed with the agent, the JAVA_HOME gets set when the auto.profile gets sourced. In the auto.profile, we source the Autosys host environment script:
case $AUTOSERV in
test -f $AUTOUSER/autosys.sh.redhat-1136sp3.ca.com &&
. $AUTOUSER/autosys.sh.redhat-1136sp3.ca.com <<<<<<<
If you don't want the environment scripts specified in the auto.profile to set the JAVA_HOME environment variable, then comment out the following line in your autosys.sh.$HOSTNAME script, located in the $AUTOUSER directory:
JAVA_HOME=/opt/CA/WorkloadAutomationAE/JRE_WA ; export JAVA_HOME