Move the domain.conf call in domain.sh (and also domain.conf.bat in domain.bat) so it's called after the JBOSS_HOME is set. Then it's possible to use it in the configuration file. E.g. we use following line to enable security manager: JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy==/tmp/security.policy -Djboss.home.dir=$JBOSS_HOME -Djboss.modules.policy-permissions=true" The order is correct in the scripts for standalone (so the JBOSS_HOME is available in its conf file).
6.x PR: https://github.com/jbossas/jboss-eap/pull/1458
Verified on EAP 6.4.0.DR1.1. JBOSS_HOME is now available in domain.conf(.bat) file.