[Index]
java
Execute a Java Program in a separate process.
Property Summary
className |
The class name |
classPath |
The class path of the java program. |
dir |
The working directory. |
environment |
An environment variable to be
set before the program is executed. |
exitValue |
The exit value of the process. |
name |
A name, can be any text. |
newEnvironment |
Create a fresh/clean environment. |
programArgs |
Space separated program arguments |
redirectStderr |
Redirect the standard error stream in
standard output. |
stderr |
An output to where stderr
of the proces will be written. |
stdin |
An input stream which will
act as stdin for the process. |
stdout |
An output to where stdout
for the process will be written. |
stop |
This flag is set by the stop method and should
be examined by any Stoppable jobs in their processing loops. |
stopForcibly |
Forcibly stop the process on stop. |
vmArgs |
Space separated vm arguments |
Example Summary
Property Detail
className
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | yes. |
The class name
classPath
Configured By | ELEMENT |
Access | READ_WRITE |
Required | no. |
The class path of the java program.
dir
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | No |
The working directory.
environment
Configured By | ELEMENT |
Access | READ_WRITE |
Required | No. |
An environment variable to be
set before the program is executed. This is a
map like property.
exitValue
The exit value of the process.
name
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | No. |
A name, can be any text.
newEnvironment
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | No. |
Create a fresh/clean environment.
programArgs
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | no. |
Space separated program arguments
redirectStderr
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | No. |
Redirect the standard error stream in
standard output.
stderr
Configured By | ELEMENT |
Access | READ_WRITE |
Required | No. |
An output to where stderr
of the proces will be written.
stdin
Configured By | ELEMENT |
Access | READ_WRITE |
Required | No. |
An input stream which will
act as stdin for the process.
stdout
Configured By | ELEMENT |
Access | READ_WRITE |
Required | No. |
An output to where stdout
for the process will be written.
stop
Access | READ_ONLY |
Required | Read Only. |
This flag is set by the stop method and should
be examined by any Stoppable jobs in their processing loops.
stopForcibly
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | No, defaults to false. |
Forcibly stop the process on stop.
vmArgs
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | no. |
Space separated vm arguments
Examples
Example 1
A simple example.
<oddjob>
<job>
<java id="javaExample" name="Java Example" className="org.oddjob.jobs.HelloMain" programArgs="Alice Bob" vmArgs="-Dour.greeting=Hello">
<classPath>
<list>
<values>
<value value="${classPath}"/>
</values>
</list>
</classPath>
</java>
</job>
</oddjob>
(c) R Gordon Ltd 2005 - Present