How to point Applications Manager on Windows server to new java
search cancel

How to point Applications Manager on Windows server to new java


Article ID: 89780


Updated On:


CA Automic Applications Manager (AM)


Affects Release version(s): 7.1

How to point Applications Manager on Windows server to new java


Component: APPMGR



Updating the JRE on Windows Master Installations
 On Windows installations, the JRE for AppWorx is installed through a packaged installer like all Windows software.  The recommended method for installing or updating to a new JRE in Windows is:
 1. Download the appropriate JRE from Sun's JavaSoft site (
 2. Stop all the AppWorx Master processes
 3. Remove the old version(s) of the JRE from the machine using the "Add or Remove Programs" utility in Windows Control Panel.
 4. Install the new JRE and record the directory that the JRE is being installed into.  The install may automatically install without telling you where it is putting the software.  Typically, it will be located in "C:\Program Files\Java\<VERSION>".
 5. When the install completes, edit the 'site/sosite.bat' file in the AppWorx installation directory.
 6. Add or change the setting JAVA_HOME in 'sosite.bat' file to reflect the new path to the JRE recorded in step 4. 
 7. Open a Command Line session and go to the AppWorx installation directory.
 8. Invoke the '.\site\sosite.bat' file to set the AppWorx environment. 
 9. Check the java version by executing:
         java -version
  If the version is not correct, verify the new JRE is in the PATH.
     Note on how Windows chooses which Java version to run
     If the PATH variable is correct and you are still getting the wrong Java version, the problem is probably due to the fact that Windows
     has 2 dummy files in the '%windir%\system32' directory named 'java.exe' and 'javaw.exe'.  These will execute whatever Java is indicated
     in the 'HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\CurrentVersion' registry variable.  The easiest way
     to correct this is to remove these 2 files from the 'system32' directory.  Once they are gone, whatever version of Java is in the PATH or
     set in the 'site\sosite.bat' file will be the one executed.
 10. Restart the AppWorx Master processes.
 11. Once the RMI Server has started, check the latest RMI log which will be located in the %AW_HOME%\log directory and named:
     and verify that the version of Java in the header is correct.


If this does not work you can try the following:


This is a bit more involved so please make sure if you do try this you back up the file before you make modifications. The file is located in the data directory.

You can change the java variable to the hardcoded path to java. You'd want to do that for both the start_agentservice and start_rmi functions if this is a master installation. For example, below is the command value for the start_agentservice function. I've highlighted the variable you'd replace with the hardcoded value.

$command = "$spawn -p $pidfile \"$java -DAgentMgr=$OPER $square_brackets $AWCOMM_OPTION -DSTACK=ENABLED $asdebug $Xrs -Xmx$java_mb $START_OPTION_AGENT -DAW_HOME=$AW_HOME -DOsType=$OSTYPE com.appworx.agent.AgentService $java_install_switch \" 1>$logfile 2>&1";

Also, just an FYI that there is currently a 255 command character limit on Windows for awspawnnt, so you want to make sure that your "command" is under 255. In other words, don't use an extremely long path to java.


A final method would be to uninstall all other version of java on the server other than the version you wish to use.