Skip to content

Dynamic Runtime Scanning (Java)

Download the Java dynamic instrumentation agent JAR from your Lineai server:

Terminal window
wget http://your_server/lineai/server/packages/java-dynamic-agent.jar

Replace your_server with your Lineai server hostname. Save the jar file in a location your application can access.

Add the following to your application’s JVM options:

  • -javaagent:"/path/to/java-dynamic-agent.jar" -Xbootclasspath/a:"/path/to/java-dynamic-agent.jar"
  • -Dlineai.url=http://serverhost.app.lineai.com/lineai/server
  • -Dlineai.username="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
  • -Dlineai.password="agentpassword"
  • -Dlineai.namespaces=com.example,com.secondexample
  • -Dlineai.scanSpaceName=Default

Run your application.

For security, agents must be authorized before they will send metadata to Lineai.

Obtain AGENT_UUID and AGENT_PASSWORD from your Lineai administrator, or set these environment variables before starting the agent. If credentials are not pre-provisioned, the agent may register with the server and await administrator approval before scans are accepted.

Stop your application to stop the scan.