In the JBOSS_HOME/bin/run.sh script, find the following lines:
if [ "x$JBOSS_CLASSPATH" = "x" ]; then JBOSS_CLASSPATH="$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR" else JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR" fi
After the lines you found in Step 1, add the following new lines:
CONFIG=$2 if [ "x$1"="x" ] && [ "x$CONFIG" = "x" ]; then CONFIG=default; fi if [ -r "setAgentClasspath$CONFIG.sh" ]; then ./opt/jboss-4.0.2/bin/setAgentClasspath$CONFIG.sh fi
Note: The previous command is for JBoss server 4.0.2. If you are using a different version, specify the appropriate JBoss server directory.
Save your changes.