JBOSS_HOME environment variable to run any of the JBoss Communications Platform servers unless JBOSS_HOME is already set.
JBOSS_HOME was set previously or not is to perform a simple check which may save you time and frustration.
echo$JBOSS_HOME to see if it is currently defined in your environment:
~]$ echo $JBOSS_HOME
JBOSS_HOME is already set on your system, then you have three options:
unset it, which only takes effect for the current session and is therefore not advised;
JBOSS_HOME is defined, such as in your local ~/.bashrc startup script in Linux, or, possibly, system-wide in /etc/bashrc, and remove it or comment it out;
JBOSS_HOME.
JBOSS_HOME environment variable must point to the directory which contains all of the files for the JBoss Communications Platform that you installed. As another hint, this topmost directory contains a bin subdirectory.
JBOSS_HOME in your personal ~/.bashrc startup script carries the advantage of retaining effect over reboots. Each time you log in, the environment variable is sure to be set for you, as a user. On Linux, it is possible to set JBOSS_HOME as a system-wide environment variable, by defining it in /etc/bashrc, but this method is neither recommended nor detailed in these instructions.
~/.bashrc startup script, which is a hidden file in your home directory, in a text editor, and insert the following line on its own line while substituting for the actual install location on your system:
export JBOSS_HOME="/home/<username>/<path>/<to>/<install_directory>"
.bashrc startup script.
source the .bashrc script to force your change to take effect, so that JBOSS_HOME becomes set for the current session[2].
~]$ source ~/.bashrc
JBOSS_HOME is set in the current session, and actually points to the correct location:
JBOSS_HOME has been set correctly to the topmost_directory of the JBCP installation. Note that if you are installing one of the standalone JBCP servers (with JBoss AS bundled!), then JBOSS_HOME would point to the topmost_directory of your server installation.
~]$ echo $JBOSS_HOME /home/silas/jboss-eap-4.3/jboss-as
JBOSS_HOME environment variable must point to the directory which contains all of the files for the JBoss Communications Platform that you installed. As another hint, this topmost directory contains a bin subdirectory.
[2]
Note that any other terminals which were opened prior to your having altered .bashrc will need to source~/.bashrc as well should they require access to JBOSS_HOME.