Linux Build Tool Profile is "not found" when using custom profile file directory and modified $HOME environment variable.

Document ID : KB000048226
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

The Build Tool (BT) automatically uses the true home directory of the logged on user, and the references Build Tool Guide to the profile residing in the "$HOME directory (UNIX and Linux)" are meant to reflect that.

So the default location of the BT profile file cannot be simply changed by editing the value of the $HOME environment variable after login.

The comments in the $IEFH/bt/bldtool script for explicitly adding an extra Java/JVM parameter '-D=user.home=…' describe how the default directory can be changed.

Solution:

In the appropriate section of the $IEFH/bt/bldtool script add '-D=user.home=…' e.g.


....                                                                         # Start Command Line                                                      #                                                                         if [ "$2" = "command" -o "$2" = "COMMAND" ]                                 then                                                                       if [ "$3" != "" ]                                                         then                                                                      shift 2                                                $IEFH/bt/jre/bin/java -Duser.home="$PROFILE_HOME" -Duser.iefh="$IEFH" $IPV -Duser.platform="$IEFPLATFORM" -jar "$IEFH/bt/bt.ui.jar" -c command $* ....  

In the above example a new environment variable PROFILE_HOME is used to enable easy change of the BT profile directory prior to running the $IEFH/bt/bldtool script e.g.

If profile file user.PROF1.profile is placed into directory /home/btprofiles then the BT Command Line Client can be executed with the following command sequence to ensure that the profile file is found:

PROFILE_HOME=/home/btprofiles;export PROFILE_HOME
$IEFH/bt/bldtool -c COMMAND -a BUILD -l /home/user1/rmtfiles -f PROF1 -n MENU.rmt