IDEA 10.5 Command line is too long
In Maven project when I run test case (on Windows):
Error running TestApp.readParameter: Command line is too long. In order to reduce its length classpath file can be used. Would you like to enable classpath file mode for all run configurations of your project? Enable
set .iws
<property name="dynamic.classpath" value="true" />
How this could be fixed?
Solution 1:
In Intellij, go to "edit configurations" (Run -> Edit Configurations), in the configuration tab that comes up in the line "shorten command line" select option "classpath file"/"@argFiles (Java 9+)", last option in the drop down menu. Fixed it for me.
Solution 2:
Setting the Shorten command line:JAR manifest
in Run/Debug Configurations resolves the issue.
Solution 3:
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" />