4.2.  Using run.sh (development)

4.2.  Using run.sh (development)

For development, you can activate the JBoss Application Server with the familiar run.sh command as usual. The jbossas RPM installs the JBOSS_HOME in

/var/lib/jbossas

So, you can cd to /var/lib/jbossas/bin and use run.sh from there.

If you wish to use a different JVM than the one that alternatives points to, you will need to set JAVA_HOME first.

Tip

JAVA_HOME can be set system-wide in /etc/profile. But beware, some users may not want to have JAVA_HOME set to this same SDK. Also, some may prefer to use the alternatives-selected one instead. These users may be affected by this global setting of JAVA_HOME.

If you still need to set JAVA_HOME for some other reason, the alternatives-selected SDK is in /usr/lib/jvm/java, so a export JAVA_HOME=/usr/lib/jvm/java will do.

IMPORTANT

The entire JBoss Application Server suite runs under a new jboss system user. It may be necessary to use the su -s /bin/bash jboss system command to run the server, change configuration, deploy etc., due to file system permissions. Alternatively, a developer can be listed in the jboss user group by the system administrator.

Yet another possibility is to create a personal copy of JBOSS_HOME (see Creating copies of JBOSS_HOME below).

To create additional JBoss Application Server configurations besides the provided 'default', 'production', 'minimal' and 'all', you must create a new directory for your configuration as follows (note the switches given to the cp command):

JBOSS_BASE=/var/lib/jbossas
cd $JBOSS_HOME
cp -pL -R server/default server/myownconfig

You can then change the configuration and request it to be used by specifying it in the -c flag to run.sh, as usual.