This message was deleted.
# community-support
s
This message was deleted.
e
However, I am able to run my code from the IntelliJ UI... but now I want to be able to run it from the gradle command line...
c
it needs toe add-modules there, which is two arguments:
Copy code
applicationDefaultJvmArgs += "--enable-preview"
 applicationDefaultJvmArgs += "--add-modules"
 applicationDefaultJvmArgs += "jdk.incubator.concurrent"
Alternate syntax (find this clearer):
Copy code
applicationDefaultJvmArgs.addAll(listOf("--enable-preview",  "--add-modules", "jdk.incubator.concurrent"))
e
Copy code
eric.kolotyluk@Y2RCV7009N loom-laboratory % ./gradlew run

> Task :run
WARNING: Using incubator modules: jdk.incubator.concurrent
Hello world!
hello loom

BUILD SUCCESSFUL in 525ms
2 actionable tasks: 1 executed, 1 up-to-date
🥳
c
cool.
e
Some things in Gradle are strings... and some are lists of strings...
c
this one is a list of arguments. Args are often confusing as command-line shells do some parsing, so folks assume they can drop the command line string directly into a process executor (whether it’s Gradle or not - any language, mechanism has this challenge), without first breaking them apart. Also applies to wildcards that the shell will expand.
e
Yup
For the curious