
We assume that you have already learned what is described in:
If you want to find the right Other component for your purposes, see Others Comparison.
JavaExecute executes Java commands.
| Component | Same input metadata | Sorted inputs | Inputs | Outputs | Each to all outputs1) | Java | CTL |
|---|---|---|---|---|---|---|---|
| JavaExecute | - | - | 0 | 0 | - | yes | no |
1) Component sends each data record to all connected output ports.
JavaExecute executes Java commands.
Runnable transformation, which is required in the component, implements
a JavaRunnable interface and inherits other common methods from the Transform interface.
See Common Java Interfaces.
Below is the list of
JavaRunnable interface methods. See Java Interfaces for
JavaExecute for more
information.

JavaExecute has neither input nor output port.
| Attribute | Req | Description | Possible values |
|---|---|---|---|
| Basic | |||
| Runnable | 1) | Runnable transformation in Java defined in the graph. | |
| Runnable URL | 1) | External file defining the runnable transformation in Java. | |
| Runnable class | 1) | External runnable transformation class. | |
| Runnable source charset | Encoding of external file defining the transformation. | ISO-8859-1 (default) | |
| Advanced | |||
| Properties | Properties to be used when executing Java command. | ||
Legend:
1) One of these must be set. These transformation attributes
must be specified. Any of these transformation attributes implements a
JavaRunnable interface.
See Java Interfaces for JavaExecute for more information.
See also Defining Transformations for detailed information about transformations.
Runnable transformation, which is required in the component, implements
a JavaRunnable interface and inherits other common methods from the Transform interface.
See Common Java Interfaces.
Following are the methods of the JavaRunnable
interface:
boolean init(Properties
parameters)
Initializes java class/function. This method is called only once at the beginning of transformation process. Any object allocation/initialization should happen here.
void free()
This is de-initialization method for this graph element. All resources allocated
in the init() method should be released here. This method is invoked only once
at the end of element existence.
void run()
The core method, which holds implementation of the Java code to be run by the JavaExecute component.
void setGraph(TransformationGraph
graph)
Method which passes into transformation graph instance
within which the transformation will be executed. Since
TransformationGraph singleton pattern was
removed, it is NO longer POSSIBLE to access graph's parameters and
other elements (e.g. metadata definitions) through
TransformationGraph.getInstance().