Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-51

Provide script to simplify installation and configuration of byteman agent

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 1.1.1
    • 1.1.0
    • Tools
    • None

      It would be nice to have a script which simplified the task of installing and configuring the byteman agent when running a Java program. The requirements are as follows:

      Syntax:

      bmjava [-l rulescript | -b bootjar | -s sysjar | -nl | -nb | -nj ]* [--] javaargs

      terms enclosed between [ ] are optional
      terms separated by | are alternatives
      a * means zero or more occurences

      -l pass the file whose name follows this flag to the agent as
      a rule script to be loaded during startup

      -b pass the file whose name follows this flag to the agent as
      a jar to be added to the bootstrap classpath

      -s pass the file whose name follows this flag to the agent as
      a jar to be added to the system classpath

      -nl do not enable the agent listener (it is enabled by default)

      -nb do not add the byteman jar to the bootstrap classpath (it is
      added by default)

      -nb do not inject into java.lang classes (it is enabled by default)

      – optional separator to distinguish trailing arguments

      javaargs trailing arguments to be supplied to the java command

      Environment:

      If BYTEMAN_HOME is set the script expects the byteman jar to be located in

      BYTEMAN_HOME/lib/byteman.jar.

      If BYTEMAN_HOME is not set then it assumes the script is being run from BYTEMAN_HOME/bin and sets BYTEMAN_HOME accordingly.

      If BYTEMAN_JAVA_ARGS is set then it is assumed to contain extra arguments to the java command which are to be inserted before the -javaagent argument.

      Behaviour:

      The script constructs a -javaagent argument to pass to the java command found in the current execution PATH. The -javaagent argument is prefixed with any arguments provided via BYTEMAN_JAVA_ARGS and suffixed with the values supplied via javaargs. The resulting command is run using an exec command.

            rhn-engineering-adinn Andrew Dinn
            rhn-engineering-adinn Andrew Dinn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: