Groovy script: Cannot run program [..] filename too long
Answered
I have midsized Gradle project with a lot of dependencies. I can run any Gradle task without issue, however, I created a short groovy script in the project that I'd like to be able to run "standalone" (I don't really need, nor want to add, a Gradle task for this).
However, when trying to run the script, I get the infamous CreateProcess error=206, The filename or extension is too long error. I assume this is due to a long classpath because of the large number of dependencies.
Is there a way to work around this error and run a groovy script from the IDE?
Please sign in to leave a comment.
It should be fixed in 2017.3 according to https://youtrack.jetbrains.com/v2/issue/IDEA-128083.
What IDE version do you use?
I am running IDEA Community 2017.3.1
Hmm, it seems the fix for Groovy console didn't affect the execution of the Groovy script. Could you please file a new bug at https://youtrack.jetbrains.com/issues/IDEA with the small sample to reproduce and the logs (https://intellij-support.jetbrains.com/hc/articles/207241085)?