Idea单测执行报错“Command line is too long“ 解决办法

最近在使用idea执行项目的单元测试的时候,会出现如下报错 : Command line is too long. Shorten command line for {className} or also for JUnit defaultconfiguration.

如下图所示:
在这里插入图片描述

解决方法一 : 修改启动配置

idea点击Edit Configurations --> Shorten command line下拉选择JAR manifest
在这里插入图片描述

解决方法二 :

在该项目下找到如下文件: /.idea/workspace.xml
在文件中找到

<component name="PropertiesComponent">

</component>

然后在其中添加 :

<property name="dynamic.classpath" value="true" />

这样问题就解决了。
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_35448165/article/details/113090864
今日推荐