This article has been archived and is no longer maintained by ForgeRock.
When you install the Administration tools (SSOAdminTools-11.0.x.zip), scripts are created with the JAVA_HOME environment variable set to @JAVA_HOME@, for example:JAVA_HOME="@JAVA_HOME@"
The ssoadm script checks if the JAVA_HOME environment variable is already set, and if so, uses that value instead; therefore, this issue can go unnoticed with the ssoadm script.
Errors similar to the following are shown when you attempt to use the Administration tools:
- ampassword: [user@server bin]# ./ampassword ./ampassword: line 51: @JAVA_HOME@/bin/java: No such file or directory
- amverifyarchive: [user@server bin]# ./amverifyarchive ./amverifyarchive: line 52: @JAVA_HOME@/bin/java: No such file or directory
- ssoadm: [user@server bin]# ./ssoadm ./ssoadm: line 102: @JAVA_HOME@/bin/java: No such file or directory
Upgraded to OpenAM 11.0.0, 11.0.1 or 11.0.2.
The @JAVA_HOME@ variable in the scripts should be replaced with the $JAVA_HOME value specified in the respective template files (ampassword, amverifyarchive and ssoadm) when the Administration tools are installed. Instead, the @JAVA_HOME@ variable text is used to set the JAVA_HOME environment variable.
This issue can be resolved by upgrading to OpenAM 11.0.3 or later; you can download this from BackStage.
Alternatively, you can resolve it by manually changing the JAVA_HOME variable in the scripts to the correct value before using the Administration tools.
For example, in the ampassword and amverifyarchive scripts:JAVA_HOME="/path/to/jdk"
And in the ssoadm script:if [ -z "$JAVA_HOME" ] ; then JAVA_HOME="/path/to/jdk" fi
If you want to perform an automated scripted install, you can use a command to replace the JAVA_HOME value. For example, for the ampassword script, you could use a command such as:$ sed -i.bak -e "s/^JAVA_HOME=.*/JAVA_HOME=\/usr\/java\/latest/g" ampassword