- All Implemented Interfaces:
- java.io.Serializable, java.lang.Runnable
public class LaunchJob
extends java.lang.Object
implements java.lang.Runnable, java.io.Serializable
Description
Launch an application via it's main method. The
application is launched in same JVM as Oddjob, but in it's own class loader.Example
An Oddjob the launches Oddjob. args[0] is org.oddjob.Main, args[1] is the
oddjob home directory. The classes directory is included in the class path
for the log4j.properties file otherwise Log4j would attempt to use one
from ClassLoader.getSystemLoader() which will be the original application
class loader.
<oddjob id="this">
<job>
<launch className="${this.args[1]}">
<args>
<list>
<values>
<value value="-nb"/>
<value value="-f"/>
<value value="${this.args[0]}/test/conf/echo-class-loader.xml"/>
<value value="-l"/>
<value value="${this.args[0]}/${this.args[2]}"/>
</values>
</list>
</args>
<classLoader>
<url-class-loader noInherit="true">
<files>
<files files="${this.args[3]}/lib/*.jar">
<list>
<file file="${this.args[3]}/classes"/>
<file file="${this.args[3]}/opt/classes"/>
</list>
</files>
</files>
</url-class-loader>
</classLoader>
</launch>
</job>
</oddjob>
- See Also:
- Serialized Form
- Author:
- rob