IDEA运行新项目时报Error running ‘XXXApplication‘: Command line is too long. Shorten command line for XXXApp

在这里插入图片描述

解决方法:

首先找到项目工程里面的.idea/workspace.xml文件,
然后再找到<component name="PropertiesComponent"></component>标签,
标签如图所示:

在这里插入图片描述

然后再在component 标签中添加一行 
<property name="dynamic.classpath" value="true" />
如图:

在这里插入图片描述

保存后,再次启动项目即可成功运行了。


版权声明:本文为sgrrmswtvt原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。