Gradle JavaExec Task Type: Difference between revisions
Jump to navigation
Jump to search
(→main) |
|||
Line 31: | Line 31: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==<tt>main</tt>== | ==<tt>main</tt>== | ||
==<tt>args</tt>== | |||
==<tt>environment</tt>== | ==<tt>environment</tt>== | ||
==<tt>systemProperties</tt>== | ==<tt>systemProperties</tt>== |
Revision as of 19:35, 3 February 2021
External
- https://docs.gradle.org/current/dsl/org.gradle.api.tasks.JavaExec.html
- https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/JavaExec.html
- https://www.baeldung.com/gradle-run-java-main
Internal
Overview
Executes a Java application as a child process. To get details on the actual java command line, execute Gradle with -i command line option.
task someTask(type: JavaExec) {
jvmArgs = ['-Xmx12g']
classpath = configurations.runtimeClasspath
main = 'myPackage.MyMainClass'
args 'something somethingelse'
environment "LD_LIBRARY_PATH", "/usr/local/lib"
systemProperties [ "some.prop": "some.value", "some.other.prop": "some.other.value" ]
}
Configuration
classpath
classpath = sourceSets.main.runtimeClasspath
classpath = configurations.runtimeClasspath