CreateProcess error=206 The filename or extension is too long
Solution 1:
In addition to changing the run configuration, you must also enable this in your workspace. It's quite silly that this is still required, and not enabled by default.
Open the file .idea/workspace.xml
file from your project root folder, go to section
<component name="PropertiesComponent">
and add the following:
<property name="dynamic.classpath" value="true" />
Solution 2:
It works for me in intellij: Run -> Edit Configurations -> Modify options -> Shorten command line -> and select last option from Shorten command line (@argfile(Java9+))