Workload Automation Autosys
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, which is the other script containing JAVA_HOME variables.
case $AUTOSERV inACE) AUTOUSER=/opt/CA/WorkloadAutomationAE/autouser.ACE test -f $AUTOUSER/autosys.sh.test.example.com && . $AUTOUSER/autosys.sh.test.example.com <<<<<<< ;;esac
The autosys.sh.test-example.com script in this case has entries like this:
JRE_PATH=/opt/CA/WorkloadAutomationAE/JRE_WA ; export JRE_PATHJRE_HOME=/opt/CA/WorkloadAutomationAE/JRE_WA ; export JRE_HOMEJAVA_HOME=/opt/CA/WorkloadAutomationAE/JRE_WA ; export JAVA_HOME
Any variables that are not needed by the Agent, those can be commented out in the appropriate scripts mentioned above.
Exit all the open shell prompts, restart the Agent using a brand new shell to make the changes to be effective to the Agent.