With 21.0 and 24.X introducing OS agents that are java based instead of c-based, if the OS is already using JAVA_HOME for other applications that they are running on their agent, is there an alternative way to point the upgraded agent install to use a different java location other than changing the JAVA_HOME variable. How can we point the java based Automic agents to use a different location than what is specified with JAVA_HOME environment variable? Can it be used from the INI file or from command line start up somehow?
Java based OS agents (Linux, UNIX, Windows)
For java-based OS agents (all version 24 windows and UNIX agents are java-based and some 21.0 are) being started from the service manager or command line, there's a setting when using the startup command. You can add a -vm:[java_home] setting. For example, if we are starting the windows agent with the start command:
C:\Apps\AutomicAgent\Agent\bin\UCXJWX6.exe
or for the linux agent:
./ucxjlx6
and java is located in
C:\Program Files\Eclipse Adoptium\jdk-17\bin
or
/usr/lib/jvm/java-17-openjdk-amd64
you'll use the java path without the \bin like this:
C:\Apps\AutomicAgent\Agent\bin\UCXJWX6.exe -vm:"C:\Program Files\Eclipse Adoptium\jdk-17"
or
./ucxjlx6 -vm:/usr/lib/jvm/java-17-openjdk-amd64
This will pick up the openjdk 17 in the example above.