JCL is a configurable, dynamic and extensible custom classloader that loads java classes directly from Jar files and other sources. The motivation was to create isolated classloaders, which can be easily integrated with IoC frameworks like Spring and with web applications. Click here for more details on usage.
To use JCL, download and build the JCL project and put jcl(-core-2.x).jar and dependencies in the application's classpath. See the downloads section for more details on the available builds and source.
After the jar files are downloaded; use commands, like the following, to install the downloaded artifacts to the local maven repository so that they can be pulled into your maven projects:
mvn install:install-file -Dfile=jcl-core-2.0.jar -DgroupId=org.xeustechnologies \
-DartifactId=jcl-core -Dversion=2.0 -Dpackaging=jar -DgeneratePom=true
As of v2.1, in order to include JCL as dependency apart from the command above, you can add the following repository to your maven project:
<repositories>
<repository>
<id>jcl-sourceforge</id>
<url>http://jcloader.sourceforge.net/mvn-repo</url>
</repository>
</repositories>
JCL is a multi-module maven project that has four modules as shown below:
JCL |---> core |---> spring |---> test-jar |---> test-web
The test-* modules create resources to run the unit tests and a sample web application. The core module builds an artifact with all the main JCL class files. The spring module generates an artifact for spring integration.
To build JCL, check-out the source code and run the following command:
mvn clean install
This command will create jcl-core and jcl-spring artifacts, and will also create a sample war file to test JCL web integration.
JCL requires JDK 1.5 or later; and will pull in all its dependencies using maven.