Home | Table of Contents | JavaExecute | CloverETL 4.6.1
--- | --- | ---
Prev | Deprecated | Next

## JavaExecute

# Not available in Community Designer

# Deprecated Component

Short Description
Ports
JavaExecute Attributes
Details
Best Practices
Compatibility
See also

### Short Description

JavaExecute executes Java commands.

JavaExecute is deprecated. Use CustomJavaComponent instead of JavaExecute.

Component | Same input metadata | Sorted inputs | Inputs | Outputs | Each to all outputs | Java | CTL | Auto-propagated metadata
--- | --- | --- | --- | --- | --- | --- | --- | ---
JavaExecute | - | - | 0 | 0 | - |  |  | -

### Icon

### Ports

JavaExecute has neither input nor output port.

### JavaExecute Attributes

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. The default encoding depends on DEFAULT_SOURCE_CODE_CHARSET in defaultProperties. | E.g. UTF-8
Advanced
Properties |  | Properties to be used when executing Java command. |
[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.

### Details

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.

### Java Interfaces for JavaExecute

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()`.

### Best Practices

If the transformation is specified in an external file (with Runnable URL), we recommend users to explicitly set Runnable source charset.

### Compatibility

JavaExecute is deprecated since CloverETL 4.1.0-M1.

Use CustomJavaComponent instead of JavaExecute.

### See also

Common Properties of Components
Specific Attribute Types
Others Comparison

Prev | Up | Next
ApproximativeJoin | Home | Table of Contents | CTL2 - CloverETL Transformation Language