9 Replies Latest reply on Apr 1, 2010 9:12 AM by Peter Johnson

    Why do we need jboss.home.dir/jboss.home.url properties?

    Vladimir Bezugliy Novice

      I have JBoss 4 installed on my PC to directory C:\JBoss4
      And environment  variable JBOSS_HOME set to this directory:


      I need to install JBoss 5.1 on the same PC.
      I installed it into  C:\JBoss51

      In order to start JBoss 5.1 on the same host where JBoss 4 was  already started, I need to redefine properties jboss.home.dir,  jboss.home.url, jboss.service.binding.set:

      C:\JBoss51\bin\run.sh -Djboss.home.dir=C:/JBoss51 \ 
                            -Djboss.home.url=file:/C:/JBoss51 \ 

      But in C:\JBoss51\bin\run.sh I can see following code:

      if [ "x$JBOSS_HOME" = "x" ]; then 
          # get the full path (without any relative bits) 
          JBOSS_HOME=`cd $DIRNAME/..; pwd` 
      export JBOSS_HOME 

      And this code does not depend either on jboss.home.dir or on  jboss.home.url.


      So when I start JBoss 5.1 script will use  jar files from JBoss 4.3?
      Is it correct?


      Should I redefine environment  variable JAVA_HOME when I start JBoss 5.1?
      In this case script will use  correct jar files.
      Or if I redefined properties jboss.home.dir,  jboss.home.url then JBoss will not use any variables set in run.sh?


      How does it works?