Skip to content

Dynamic Runtime Scanning (Java)

Important

  • To perform a runtime scan, you must have an environment in which you can start your application with additional JVM options.

Instrument Your Application

  • Click Store from the left hand menu.

Store_JavaDynamicInstrumentionAgent.png

  • Locate the Java Dynamic Instrumentation Agent tile and click Download.
  • Save the jar file in a location your application can access.
  • Add the following to your application's JVM options:
    • -javaagent:"/path/to/java-instrumentation.jar" -Xbootclasspath/a:"/path/to/java-instrumentation.jar"
    • -Dcodelogic.url=http://serverhost.app.codelogic.com/codelogic/server
    • -Dcodelogic.username="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
    • -Dcodelogic.password="agentpassword"
    • -Dcodelogic.namespaces=com.example,com.secondexample
  • Run your application. The instrumentation agent will report that it has connected to the dynamic agent.

Note

  • The username and password fields are to be used for existing agent credentials.
  • If username and password is omitted and the agent will register itself.

Note

  • Data is sent to the CodeLogic server every 1 minute.
  • This interval can be changed with the -Dcodelogic.reportingInterval parameter.
  • Example: -Dcodelogic.reportingInterval=5 for 5 minute intervals.

Authorize the Agent

For security, agents must be authorized before they will send metadata to the CodeLogic Server.

See Authorizing Agents

Stop the Scan

Stop your application to stop the scan.

View Scan Results

  • Log in to the CodeLogic Server.
  • Select the Search tab.
  • Expand the application to view items and their dependencies.