gradle
8.4

# javaexec

abstract fun javaexec(@DelegatesTo(value = JavaExecSpec::class) closure: Closure): ExecResult(source)

Executes a Java main class. The closure configures a org.gradle.process.JavaExecSpec.

#### Return

the result of the execution

#### Parameters

closure

The closure for configuring the execution.

abstract fun javaexec(action: Action<out Any>): ExecResult(source)

Executes a Java main class.

#### Return

the result of the execution

#### Parameters

action

The action for configuring the execution.