Version 16

    Parameters passed to the JBoss Run Scripts

     

    JBoss is started using either:

    • ./run.sh on Unx

    • run.bat on Windows

     

    The parameters

     

    • help

      - shows the help message, example below

    • version

      - shows the JBoss version

    • D

      - defines a system property, e.g. -Djava.rmi.hostname=localhost

    • patchdir

      - a directory containing jars to be used instead of the default kernel jars

    • netboot

      - the url containing the jboss image that will be loaded

    • configuration

      - the name of the server configuration, e.g. minimal, default, all

    • jaxp

      - the JAXP implementation to use (a short cut instead of using -D options) currently xerces and crimson are supported

    • library

      - add additional jars from the /lib folder to the bootstrap classloader

    • classpath

      - add an extra url to the classpath (by default run.jar and tools.jar)

    • properties

      - a url containing a properties file to set as system properties

    • host

      - the host or ip address used by jboss services as the binding address (equivalent to -Djboss.bind.address=host), e.g. -b localhost

     

    Environment variables

     

    The following enviroment variables are used by the scripts, they can also be configured

    in run.conf under Unx

     

    • JAVA_HOME

      - the location of the jdk (java development kit)

    • JAVA_OPTS

      - options passed the java command, e.g. -Xmx512M

    • JAVA

      - the name of the java binary (default java)

    • JBOSS_CLASSPATH

      - additional classpath entries, if this is set, its value will be prepended to the classpath at startup

    • MAX_FD

      - the maximum number of file descriptors used by JBoss (Unx only)

     

    You can get an updated list of parameters using the help option

    E:\mydocs\jboss\support\sandbox\jboss-4.0.3SP1\bin>run --help
    ===============================================================================
    .
      JBoss Bootstrap Environment
    .
      JBOSS_HOME: E:\mydocs\jboss\support\sandbox\jboss-4.0.3SP1\bin\\..
    .
      JAVA: c:\j2sdk1.4.2_08\bin\java
    .
      JAVA_OPTS:  -Dprogram.name=run.bat -Xms128m -Xmx512m
    .
      CLASSPATH: c:\j2sdk1.4.2_08\lib\tools.jar;E:\mydocs\jboss\support\sandbox\jboss-4.0.3SP1\bin\\run.jar
    .
    ===============================================================================
    .
    usage: run.bat [options]
    
    options:
        -h, --help                    Show this help message
        -V, --version                 Show version information
        --                            Stop processing options
        -D<name>[=<value>]            Set a system property
        -d, --bootdir=<dir>           Set the boot patch directory; Must be absolute or url
        -p, --patchdir=<dir>          Set the patch directory; Must be absolute or url
        -n, --netboot=<url>           Boot from net with the given url as base
        -c, --configuration=<name>    Set the server configuration name
        -B, --bootlib=<filename>      Add an extra library to the front bootclasspath
        -L, --library=<filename>      Add an extra library to the loaders classpath
        -C, --classpath=<url>         Add an extra url to the loaders classpath
        -P, --properties=<url>        Load system properties from the given url
        -b, --host=<host or ip>       Bind address for all JBoss services. Further explanation below.
        -g, --partition=<name>        HA Partition name (default=DefaultDomain)
        -u, --udp=<ip>                UDP multicast address
    

    Note: Make sure to check out this wiki JBossProperties for a more comprehensive list of properties.

     

    -


     

    Run parameters explained

     

    -b <host or ip>, --host=<host or ip>

     

    When the AS parses the command line args, the -b switch sets two system properties -- jboss.bind.address and bind.address. JGroups uses the latter, which is the one used to indicate JGroups which IP address is used to bind the cluster (bind.address overrides bind_addr in XML). AS uses jboss.bind.address to indicate the address where services such as Tomcat, jrmp/pooled invokers services,...etc should be listening.

     

    You can specify 0.0.0.0 as the ip address to bind to all addresses.

     

    Separating clustering traffic from traffic related to incoming requests using different networks for each type of traffic is a recommended practice. If you want to know more about it, check the JGroups FAQ page.