This message was deleted.
# community-support
s
This message was deleted.
s
Ah, I guess I could just use a regular
Jar
task 😄
v
What do you need it for? Gradle should since 6.0 automatically create and use such a jar when necessary.
s
Right, but I'm back to my problem of programmatically creating an IDEA run configuration; the class path it too long to be passed via
jvmArgs
'
-cp
option. But I believe to already have found another solution that also fixes another problem...
v
Ah, right
Then you probably just could use a
Jar
task, yes. Or an @-file.
s
That doesn't work anyway as IntelliJ wouldn't let me use a
mainClass
for the run configuration that's only passed via
-cp
. It needs to be somewhere in "External Libraries" as shown in the IDE's "Project" view.
v
In case your application ignores additional arguments it didn't expect, you can probably also just give the main class as last
jvmArg
too and select any main class IJ will accept, for example something from the JDK.
Or you use some other run configuration type, "JAR Application" instead of "Application" for example.
s
That sounds interesting, let me try that...
v
Or you add a little indirection and instead configure a Gradle task to properly run the application with the plugin and (or not) create Gradle run configuration. That would also have the benefit of not needing the IDE to run it but being able to use that Gradle task.
I'd probably opt for that option