@JAVA_HOME@/bin/java: No such file or directory error when installing Administration tools for OpenAM 11.0.0, 11.0.1 and 11.0.2

Last updated Jan 5, 2021

The purpose of this article is to provide assistance if you receive a @JAVA_HOME@/bin/java: No such file or directory error when installing the Administration tools (ampassword, amverifyarchive and ssoadm) for OpenAM 11.0.0, 11.0.1 and 11.0.2.


This article has been archived and is no longer maintained by ForgeRock.


When you install the Administration tools (, scripts are created with the JAVA_HOME environment variable set to @JAVA_HOME@, for example:


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

Recent Changes

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:


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

See Also

FAQ: Installing and using ssoadm in AM

Subsequent attempts to use ssoadm fail in AM 6.x

ssoadm create-metdata-templ command fails with NullPointerException in OpenAM 11.0.0

OpenAM Installation Guide › Installing OpenAM Tools › To Set Up Administration Tools

Related Training


Related Issue Tracker IDs

OPENAM-3789 (JAVA_HOME wrongly set in ampassword tool)

OPENAM-4218 (JAVA_HOME is not set correctly when installing admin tools (ssoadm, ampassword, amverifyarchive))

Copyright and Trademarks Copyright © 2021 ForgeRock, all rights reserved.