Skip to content

Installing and using Lightrun with Scala


Before running the app with the agent, make sure you have downloaded the Java agent.

Using the Lightrun agent

Run your application with the following command:

java -agentpath:</path-to-agent>/ -cp <path-to-scala>/scala-library.jar:<path-to-jar> <your-main-class>
  • <path-to-agent> - The absolute path to the agent's folder (~/ will not work)
  • <path-to-scala> - The absolute path to the Scala installation directory
  • <path-to-jar> - The absolute path to the Scala application to be run with the agent
  • <your-main-class> - The application main class to be run


You can also automatically attach an agent to your launched Java processes with the JAVA_OPTS environment variable.



Scala expressions are limited:

  • Expressions should be converted to their equivalent Java syntax.

Last update: May 29, 2023