Independent extensions:

RSS Feeds

Pages and Blog posts
Mailing list


How to configure the executing container's classpath

This feature is only available for local containers


This topic is not about the classpath requirements to run Cargo (see the Installation page for this); it's about configuring the classpath for the executing container. You can therefore add custom JARs (code instrumentation, DataSource JARs, security-related libraries, etc.) to the container's execution classpath as shown below.

Note that some containers also support adding custom JARs to the applications' classpath only: see Application Classpath for details.

Example using the Java API

Starting Orion 1.x with Clover jar added to its classpath. For example if you have instrumented your source code with Clover you'll need to add the Clover jar to the classpath.

InstalledLocalContainer container = new Orion1xInstalledLocalContainer(
    new OrionStandaloneLocalConfiguration("target/orion1x"));

container.setExtraClasspath(new String[] { "libs/clover.jar" });


Example using the Ant API

Starting Orion 1.x with some additional classpath entries:

<cargo containerId="orion1x" home="c:/apps/orion-1.6.0b" action="start">
    <pathelement location="libs/clover.jar"/>

Example using the Maven 2 / Maven 3 Plugin

See Starting and stopping a container - Adding jars to a container's classpath

Copyright 2004-2019. All rights reserved unless otherwise noted.
Click here to read our privacy and cookie policy