解决idea出现报错:Error running,Command line is too long. Shorten command line

问题场景

IDEA 测试类运行报错如下:

 

报错原因

因为项目需要打印的环境变量太长,超过了限制,需要缩短命令行来解决问题。

解决办法

首先找到项目里面的idea/workspace.xml文件,然后再找到 

<component name="PropertiesComponent">{
&quot;keyToString&quot;:

添加一行

   &quot;dynamic.classpath&quot;: &quot;true&quot;,

重启即可

 

posted @ 2022-09-25 10:26  晓枫的春天  阅读(664)  评论(0编辑  收藏  举报