# javaexec

abstract fun javaexec(action: Action<in JavaExecSpec>): ExecOutput(source)

Allows lazy access to the output of the external java process.

When the process output is read at configuration time it is considered as an input to the configuration model. Consequent builds will re-execute the process to obtain the output and check if the cached model is still up-to-date.

The process input and output streams cannot be configured.

For more sophisticated use cases, like handling execution exceptions, supplying input streams or processing the output in a streaming way, use ValueSource.

#### Return

an interface that allows lazy access to the process' output.

#### Since

7.5

#### Parameters

action

the configuration of the external process with the output stream pre-configured.