Smarts SAM: How do you force the Global Console to use a specific version of Java?
search cancel

Smarts SAM: How do you force the Global Console to use a specific version of Java?

book

Article ID: 332021

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Symptoms:


This article explains how to force Smarts SAM Global Console for Windows to use a specific version of Java instead of the default version on the system.

The Smarts SAM Global Console for Windows will use the default Java on the machine. This can potentially cause conflicts if the default version does not match up with the version required for a specific version of the Global Console.

Environment

VMware Smart Assurance - SMARTS

Resolution

The configuration settings required to specify a specific installation of Java be used by Smarts Global Console is found in the runcmd_env.sh file at the following location:

<BASEDIR>\smarts\local\conf\runcmd_env.sh

To edit the runcmd_env.sh file and specify the required Java version, do the following:
  1. Open a command prompt on the Windows System: 
Start > Run > cmd
  1. Change (cd) to the <BASEDIR>\smarts\bin directory:

 
  1. Open the runcmd_env.sh file for editing using sm_edit:
  1. SM_EDIT will open the runcmd_env.sh file for editing in WordPad as shown in the screenshot below. Add the entries at the bottom of the runcmd_env.sh file to reflect your  location for the required version of Java. The following is an example of the entries required for a configuration where the desired version of Java is found under "c:\Program Files (x86)\Java\jre6":
SM_JAVA="c:\Program Files (x86)\Java\jre6"
SM_JAVAHOME="c:\Program Files (x86)\Java\jre6";"c:\Program Files (x86)\Java\jre6\bin";"c:\Program Files (x86)\Java\jre6\bin\client"
 


Note: There are differences between Smarts SAM 8.x and 9.x versions of the Global Console. However, the entries listed above should work for both versions. SM_JAVAHOME requires that all three of the directories are listed, delimited with semi-colons as shown above.
  1. Save and close the file in WordPad.
  2. Launch the Smarts Global Console and select Help > About Global Console. Verify that the version of Java is the required version.
  1. If the Smarts Global Console will not load or generates errors about Java, this means that the paths to the directories that were added are not correct on your Windows machine. Verify the directory locations and try the preceding steps again.