To install the Java Agent on JBoss Standalone (Linux)
- Open the
bin/standalone.shfile. - Add the following
javaagentargument:CODEexport JAVA_OPTS="$JAVA_OPTS -javaagent:/agent_install_dir/javaagent.jar" - Specify the argument above the following section of
standalone.sh:CODE... while true;do if [ "x$LAUNCH_JBOSS_IN_BACKGROUND" = "X" ]; then # Execute the JVM in the foreground eval \"$JAVA\" -D\"[Standalone]\"$JAVA_OPTS \ \"-Dorg.jboss.boot.log.file=$JBOSS_LOG_DIR/boot.log\" \ \"-Dlogging.configuration=file:$JBOSS_CONFIG_DIR/logging.properties\" \ -jar \"$JBOSS_HOME/jboss-modules.jar\" \ - Restart the application server.
- Add the following to the end of the
standalone.conffile in theJAVA_OPTSsection:JSON-Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/p:{{}} <path_to_jboss_logmanager>/jboss-logmanager-<version>.jarFor JDK9 and above,-Xbootclasspath/poption has been removed; use-Xbootclasspath/ainstead:CODE-Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/a:<path_to_jboss_logmanager>/jboss-logmanager-<version>.jar - Replace
<path_to_jboss_logmanager>and<version>with the path and log manager JAR filename for your system.See Making the LogManager Location Dynamic for information on making the path dynamic.Note: Step 5 and Step 6 are required only if the log manager errors manifest. Also, repeat Step 4 after this change.